]> granicus.if.org Git - handbrake/commitdiff
WinGui: Small fix to Max Width and Height settings from presets. Presets without...
authorsr55 <sr55.hb@outlook.com>
Thu, 28 Jul 2011 19:04:14 +0000 (19:04 +0000)
committersr55 <sr55.hb@outlook.com>
Thu, 28 Jul 2011 19:04:14 +0000 (19:04 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4143 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/CS/Functions/PresetLoader.cs

index 5e95cfcf2d02d03d18ce1b4d97b74bd40cbab799..980e4e4d313d83060fee508ea11ab0c40fd721c4 100644 (file)
@@ -148,11 +148,9 @@ namespace Handbrake.Functions
                 mainWindow.PictureSettings.text_height.Value = presetQuery.MaxHeight.Value;\r
             }\r
 \r
-            if (presetQuery.MaxHeight.HasValue && presetQuery.MaxWidth.HasValue)\r
-            {\r
-                mainWindow.PictureSettings.PresetMaximumResolution = new Size(\r
-                    presetQuery.MaxWidth.Value, presetQuery.MaxHeight.Value);\r
-            }\r
+           mainWindow.PictureSettings.PresetMaximumResolution = new Size(\r
+                    presetQuery.MaxWidth.HasValue ? presetQuery.MaxWidth.Value : 0,\r
+                    presetQuery.MaxHeight.HasValue ? presetQuery.MaxHeight.Value : 0);\r
 \r
             // Case where both height and max height are 0 - For built-in presets\r
             if (presetQuery.MaxHeight == 0 && presetQuery.Height == 0)\r