summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsr55 <[email protected]>2011-08-27 22:04:54 +0000
committersr55 <[email protected]>2011-08-27 22:04:54 +0000
commit2a86ec4e31d5eddc17902ce225caaac39f84842e (patch)
tree36c1d1e3c39857179bc4342038be5ef0f5b30d77
parent915363d852a04538d70e69b8efada8f6a7603e28 (diff)
WinGui: Some tweaks to the way the picture settings panel handles cropping and preset stored values. Check if the preset has values, before ignoring the source values.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4196 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--win/CS/Controls/PictureSettings.cs12
1 files changed, 10 insertions, 2 deletions
diff --git a/win/CS/Controls/PictureSettings.cs b/win/CS/Controls/PictureSettings.cs
index c4ae909c0..7684c9ad6 100644
--- a/win/CS/Controls/PictureSettings.cs
+++ b/win/CS/Controls/PictureSettings.cs
@@ -12,6 +12,7 @@ namespace Handbrake.Controls
using HandBrake.ApplicationServices.Model;
using HandBrake.ApplicationServices.Parsing;
+ using HandBrake.ApplicationServices.Utilities;
/// <summary>
/// The Picture Settings Panel
@@ -101,14 +102,21 @@ namespace Handbrake.Controls
lbl_src_res.Text = sourceTitle.Resolution.Width + " x " + sourceTitle.Resolution.Height;
// Set the Recommended Cropping values, but only if a preset doesn't have hard set picture settings.
- if ((CurrentlySelectedPreset != null && CurrentlySelectedPreset.CropSettings == false) || CurrentlySelectedPreset == null)
+ EncodeTask presetQuery = null;
+ if (this.CurrentlySelectedPreset != null)
+ presetQuery = QueryParserUtility.Parse(CurrentlySelectedPreset.Query);
+
+ if ((CurrentlySelectedPreset != null && CurrentlySelectedPreset.CropSettings == false) ||
+ CurrentlySelectedPreset == null ||
+ (presetQuery != null && !presetQuery.HasCropping)
+ )
{
crop_top.Value = GetCropMod2Clean(sourceTitle.AutoCropDimensions.Top);
crop_bottom.Value = GetCropMod2Clean(sourceTitle.AutoCropDimensions.Bottom);
crop_left.Value = GetCropMod2Clean(sourceTitle.AutoCropDimensions.Left);
crop_right.Value = GetCropMod2Clean(sourceTitle.AutoCropDimensions.Right);
}
-
+
SetPresetCropWarningLabel(CurrentlySelectedPreset);
// Set the Resolution Boxes