summaryrefslogtreecommitdiffstats
path: root/win/CS/Functions
diff options
context:
space:
mode:
authorsr55 <[email protected]>2011-07-28 19:04:14 +0000
committersr55 <[email protected]>2011-07-28 19:04:14 +0000
commit820483fa9921d01989cf3d32537be674d965ab10 (patch)
treed8f75072b9a3be9aca4ad0b9c56a16aef469e7a4 /win/CS/Functions
parentd76ed4541ed1fca3fb13148f8acb3738a08b336e (diff)
WinGui: Small fix to Max Width and Height settings from presets. Presets without both Max width and height set may have a problem when changing source and may not always obey the max width or height.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4143 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/Functions')
-rw-r--r--win/CS/Functions/PresetLoader.cs8
1 files changed, 3 insertions, 5 deletions
diff --git a/win/CS/Functions/PresetLoader.cs b/win/CS/Functions/PresetLoader.cs
index 5e95cfcf2..980e4e4d3 100644
--- a/win/CS/Functions/PresetLoader.cs
+++ b/win/CS/Functions/PresetLoader.cs
@@ -148,11 +148,9 @@ namespace Handbrake.Functions
mainWindow.PictureSettings.text_height.Value = presetQuery.MaxHeight.Value;
}
- if (presetQuery.MaxHeight.HasValue && presetQuery.MaxWidth.HasValue)
- {
- mainWindow.PictureSettings.PresetMaximumResolution = new Size(
- presetQuery.MaxWidth.Value, presetQuery.MaxHeight.Value);
- }
+ mainWindow.PictureSettings.PresetMaximumResolution = new Size(
+ presetQuery.MaxWidth.HasValue ? presetQuery.MaxWidth.Value : 0,
+ presetQuery.MaxHeight.HasValue ? presetQuery.MaxHeight.Value : 0);
// Case where both height and max height are 0 - For built-in presets
if (presetQuery.MaxHeight == 0 && presetQuery.Height == 0)