diff options
author | sr55 <[email protected]> | 2019-03-24 21:45:13 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2019-03-24 21:45:13 +0000 |
commit | 99c35442c9c104e83b9b20624bfaf02fc5813f68 (patch) | |
tree | 637968373e87fdfba8aaa76a508e8527731d2b6a /win | |
parent | 9a0a337de714c33400f8093e0dbb50c5d6f66242 (diff) |
WinGui: Fix an issue where cropping was taking into account too late when loading presets. Fixes #2007
Diffstat (limited to 'win')
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs index 914d54068..3ee12fa6d 100644 --- a/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs @@ -626,6 +626,26 @@ namespace HandBrakeWPF.ViewModels preset.PictureSettingsMode = PresetPictureSettingsMode.Custom;
}
+ // Cropping
+ if (preset.Task.HasCropping)
+ {
+ this.IsCustomCrop = true;
+ this.Task.Cropping.Left = preset.Task.Cropping.Left;
+ this.Task.Cropping.Right = preset.Task.Cropping.Right;
+ this.Task.Cropping.Top = preset.Task.Cropping.Top;
+ this.Task.Cropping.Bottom = preset.Task.Cropping.Bottom;
+
+ this.NotifyOfPropertyChange(() => this.CropLeft);
+ this.NotifyOfPropertyChange(() => this.CropRight);
+ this.NotifyOfPropertyChange(() => this.CropTop);
+ this.NotifyOfPropertyChange(() => this.CropBottom);
+ }
+ else
+ {
+ this.IsCustomCrop = false;
+ }
+
+
// Setup the Picture Sizes
switch (preset.PictureSettingsMode)
{
@@ -701,20 +721,6 @@ namespace HandBrakeWPF.ViewModels this.ParHeight = preset.Task.PixelAspectY;
}
- // Cropping
- if (preset.Task.HasCropping)
- {
- this.IsCustomCrop = true;
- this.CropLeft = preset.Task.Cropping.Left;
- this.CropRight = preset.Task.Cropping.Right;
- this.CropTop = preset.Task.Cropping.Top;
- this.CropBottom = preset.Task.Cropping.Bottom;
- }
- else
- {
- this.IsCustomCrop = false;
- }
-
this.NotifyOfPropertyChange(() => this.Task);
this.UpdateVisibileControls();
|