summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs
diff options
context:
space:
mode:
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs')
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs14
1 files changed, 12 insertions, 2 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs
index e2684047e..d569b7824 100644
--- a/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs
@@ -634,8 +634,16 @@ namespace HandBrakeWPF.ViewModels
this.MaintainAspectRatio = preset.Task.KeepDisplayAspect;
// Set the Maximum so libhb can correctly manage the size.
- this.MaxWidth = preset.Task.MaxWidth ?? this.sourceResolution.Width;
- this.MaxHeight = preset.Task.MaxHeight ?? this.sourceResolution.Height;
+ if (preset.PictureSettingsMode == PresetPictureSettingsMode.SourceMaximum)
+ {
+ this.MaxWidth = this.sourceResolution.Width;
+ this.MaxHeight = this.sourceResolution.Height;
+ }
+ else
+ {
+ this.MaxWidth = preset.Task.MaxWidth ?? this.sourceResolution.Width;
+ this.MaxHeight = preset.Task.MaxHeight ?? this.sourceResolution.Height;
+ }
// Set the width, then check the height doesn't breach the max height and correct if necessary.
int width = this.GetModulusValue(this.GetRes((this.sourceResolution.Width - this.CropLeft - this.CropRight), preset.Task.MaxWidth));
@@ -679,6 +687,8 @@ namespace HandBrakeWPF.ViewModels
}
this.NotifyOfPropertyChange(() => this.Task);
+
+ this.UpdateVisibileControls();
}
/// <summary>