diff options
-rw-r--r-- | win/CS/Functions/PresetLoader.cs | 2 | ||||
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Model/EncodeTask.cs | 5 | ||||
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Utilities/QueryParserUtility.cs | 3 |
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.
}
}
|