summaryrefslogtreecommitdiffstats
path: root/win/CS
diff options
context:
space:
mode:
authorsr55 <[email protected]>2019-01-01 15:24:46 +0000
committersr55 <[email protected]>2019-01-01 15:25:04 +0000
commitbc3b03a612e9889f3d50459982c49db70705e3eb (patch)
tree501d5c4c22afc42079891dee3c1b6cf942454a2c /win/CS
parent3241e3e43190c5fe3738cdf1abce34045c1143b8 (diff)
WinGui: Fix restriction on the picture settings tab after setting a preset. It will use whatever is smaller. Source, or Preset #1773
Diffstat (limited to 'win/CS')
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs8
1 files changed, 6 insertions, 2 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs
index 1764a7dac..914d54068 100644
--- a/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs
@@ -653,8 +653,12 @@ namespace HandBrakeWPF.ViewModels
}
else
{
- this.MaxWidth = preset.Task.MaxWidth ?? this.sourceResolution.Width;
- this.MaxHeight = preset.Task.MaxHeight ?? this.sourceResolution.Height;
+
+ int presetWidth = preset.Task.MaxWidth ?? this.sourceResolution.Width;
+ int presetHeight = preset.Task.MaxHeight ?? this.sourceResolution.Height;
+
+ this.MaxWidth = presetWidth <= this.sourceResolution.Width ? presetWidth : this.sourceResolution.Width;
+ this.MaxHeight = presetHeight <= this.sourceResolution.Height ? presetHeight : this.sourceResolution.Height;
}
// Set the width, then check the height doesn't breach the max height and correct if necessary.