]> granicus.if.org Git - handbrake/commitdiff
WinGui: Preset Save Changes fixes.
authorsr55 <sr55.hb@outlook.com>
Sun, 5 Feb 2012 16:26:43 +0000 (16:26 +0000)
committersr55 <sr55.hb@outlook.com>
Sun, 5 Feb 2012 16:26:43 +0000 (16:26 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4440 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/CS/HandBrake.ApplicationServices/Utilities/QueryParserUtility.cs
win/CS/frmMain.cs

index f502b1320bcb535d0b9994fe222216bd326b562c..93fbff0585ea0e9be9732fd8206f5addc89bb656 100644 (file)
@@ -101,8 +101,8 @@ namespace HandBrake.ApplicationServices.Utilities
             Match audioSampleRates = Regex.Match(input, @"-R ([0-9a-zA-Z.,]*)"); // Auto = a-z\r
             Match drcValues = Regex.Match(input, @"-D ([0-9.,]*)");\r
             Match gainValues = Regex.Match(input, @"--gain=([0-9.,-]*)");\r
-            Match fallbackEncoder = Regex.Match(input, @"--audio-fallback([a-zA-Z0-9:=\s]*)");\r
-            Match allowedPassthru = Regex.Match(input, @"--audio-copy-mask([a-zA-Z0-9:,=\s]*)");\r
+            Match fallbackEncoder = Regex.Match(input, @"--audio-fallback([a-zA-Z0-9:=\s ]*)");\r
+            Match allowedPassthru = Regex.Match(input, @"--audio-copy-mask([a-zA-Z0-9:,=\s ]*)");\r
 \r
             // Chapters Tab\r
             Match chapterMarkers = Regex.Match(input, @" -m");\r
index 85d854eb61b72b6851fce6171a024a8b491de36f..6e74c96cbad101018233b9567d7a6e665de7b40d 100644 (file)
@@ -541,6 +541,16 @@ namespace Handbrake
         /// </param>\r
         private void pmnu_saveChanges_Click(object sender, EventArgs e)\r
         {\r
+            if (this.selectedTitle == null)\r
+            {\r
+                MessageBox.Show(\r
+                            "Please scan a source before trying to update a preset.",\r
+                            "Error",\r
+                            MessageBoxButtons.OK,\r
+                            MessageBoxIcon.Error);\r
+                return;\r
+            }\r
+\r
             DialogResult result =\r
                 MessageBox.Show(\r
                     "Do you wish to include picture settings when updating the preset: " +\r
@@ -554,7 +564,7 @@ namespace Handbrake
                     Query = query,                  \r
                     CropSettings = (result == DialogResult.Yes),\r
                     AudioPassthruSettings = this.AudioSettings.PassthruSettings,\r
-                    Task = QueryParserUtility.Parse(query),\r
+                    Task = QueryParserUtility.Parse(query),                \r
                 };\r
 \r
             presetHandler.Update(preset);\r