summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorsr55 <[email protected]>2011-08-27 21:50:01 +0000
committersr55 <[email protected]>2011-08-27 21:50:01 +0000
commit915363d852a04538d70e69b8efada8f6a7603e28 (patch)
treef8f31d501bca0651d1108bb4f5dd48348694d3ef /win
parent3e32e57c216db0b6acf6166b9f23f2ede3aece30 (diff)
WinGui: Broke the preset loader in the last commit. Now Fixed.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4195 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win')
-rw-r--r--win/CS/Functions/PresetLoader.cs2
-rw-r--r--win/CS/HandBrake.ApplicationServices/Model/EncodeTask.cs5
-rw-r--r--win/CS/HandBrake.ApplicationServices/Utilities/QueryParserUtility.cs3
3 files changed, 9 insertions, 1 deletions
diff --git a/win/CS/Functions/PresetLoader.cs b/win/CS/Functions/PresetLoader.cs
index 69acda4b2..e78754925 100644
--- a/win/CS/Functions/PresetLoader.cs
+++ b/win/CS/Functions/PresetLoader.cs
@@ -96,7 +96,7 @@ namespace Handbrake.Functions
#region Picture
mainWindow.PictureSettings.check_autoCrop.Checked = true;
- if (preset.CropSettings)
+ if (preset.CropSettings && presetQuery.HasCropping)
{
mainWindow.PictureSettings.check_customCrop.Checked = true;
mainWindow.PictureSettings.crop_top.Value = presetQuery.Cropping.Top;
diff --git a/win/CS/HandBrake.ApplicationServices/Model/EncodeTask.cs b/win/CS/HandBrake.ApplicationServices/Model/EncodeTask.cs
index 31b46acdf..bcc07d55f 100644
--- a/win/CS/HandBrake.ApplicationServices/Model/EncodeTask.cs
+++ b/win/CS/HandBrake.ApplicationServices/Model/EncodeTask.cs
@@ -118,6 +118,11 @@ namespace HandBrake.ApplicationServices.Model
public Cropping Cropping { get; set; }
/// <summary>
+ /// Gets or sets a value indicating whether HasCropping.
+ /// </summary>
+ public bool HasCropping { get; set; }
+
+ /// <summary>
/// Gets or sets Anamorphic.
/// </summary>
public Anamorphic Anamorphic { get; set; }
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/QueryParserUtility.cs b/win/CS/HandBrake.ApplicationServices/Utilities/QueryParserUtility.cs
index a4d8d9787..99e673db9 100644
--- a/win/CS/HandBrake.ApplicationServices/Utilities/QueryParserUtility.cs
+++ b/win/CS/HandBrake.ApplicationServices/Utilities/QueryParserUtility.cs
@@ -175,9 +175,12 @@ namespace HandBrake.ApplicationServices.Utilities
int.Parse(actCropValues[1]),
int.Parse(actCropValues[2]),
int.Parse(actCropValues[3]));
+ parsed.HasCropping = true;
}
catch (Exception)
{
+ parsed.Cropping = null;
+ parsed.HasCropping = false;
// No need to do anything.
}
}