From 11b6f93d4a022f1797f62902fa7dca96033f9545 Mon Sep 17 00:00:00 2001 From: sr55 Date: Wed, 5 Jun 2013 17:52:17 +0000 Subject: WinGui: Fix an issue where cropping wasn't getting set correctly after a title change. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5560 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- .../ViewModels/PictureSettingsViewModel.cs | 36 +++++++++++----------- 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs') diff --git a/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs index 972af2910..87d0bb0c9 100644 --- a/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs @@ -736,24 +736,6 @@ namespace HandBrakeWPF.ViewModels this.MaxHeight = preset.Task.MaxHeight ?? this.sourceResolution.Height; } - // Update the cropping values, preffering those in the presets. - if (!preset.Task.HasCropping) - { - this.CropTop = title.AutoCropDimensions.Top; - this.CropBottom = title.AutoCropDimensions.Bottom; - this.CropLeft = title.AutoCropDimensions.Left; - this.CropRight = title.AutoCropDimensions.Right; - this.IsCustomCrop = false; - } - else - { - this.CropLeft = preset.Task.Cropping.Left; - this.CropRight = preset.Task.Cropping.Right; - this.CropTop = preset.Task.Cropping.Top; - this.CropBottom = preset.Task.Cropping.Bottom; - this.IsCustomCrop = true; - } - // Set the Width, and Maintain Aspect ratio. That should calc the Height for us. this.Width = preset.Task.Width ?? this.MaxWidth; // Note: This will be auto-corrected in the property if it's too large. @@ -769,6 +751,24 @@ namespace HandBrakeWPF.ViewModels } } + // Update the cropping values, preffering those in the presets. + if (!preset.Task.HasCropping) + { + this.CropTop = title.AutoCropDimensions.Top; + this.CropBottom = title.AutoCropDimensions.Bottom; + this.CropLeft = title.AutoCropDimensions.Left; + this.CropRight = title.AutoCropDimensions.Right; + this.IsCustomCrop = false; + } + else + { + this.CropLeft = preset.Task.Cropping.Left; + this.CropRight = preset.Task.Cropping.Right; + this.CropTop = preset.Task.Cropping.Top; + this.CropBottom = preset.Task.Cropping.Bottom; + this.IsCustomCrop = true; + } + // Set Screen Controls this.SourceInfo = string.Format( "{0}x{1}, Aspect Ratio: {2:0.00}", -- cgit v1.2.3