diff options
author | sr55 <[email protected]> | 2014-04-24 15:53:40 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2014-04-24 15:53:40 +0000 |
commit | 65a280e54b37280fd8a9068a79b2e859115b7131 (patch) | |
tree | 1be8e35258ef79cbb35ec00c06f82dc02393f8de | |
parent | 9547820a7225efc2a905d9b5c22437a25b7d8cdc (diff) |
WinGui: Add a warning on the add preset window if both custom width/height are empty in custom mode.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6170 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs index bedfb838c..ac48134d4 100644 --- a/win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs @@ -86,12 +86,12 @@ namespace HandBrakeWPF.ViewModels /// <summary>
/// Gets or sets CustomWidth.
/// </summary>
- public int CustomWidth { get; set; }
+ public int? CustomWidth { get; set; }
/// <summary>
/// Gets or sets CustomHeight.
/// </summary>
- public int CustomHeight { get; set; }
+ public int? CustomHeight { get; set; }
/// <summary>
/// Gets or sets a value indicating whether ShowCustomInputs.
@@ -184,6 +184,12 @@ namespace HandBrakeWPF.ViewModels return;
}
+ if (this.CustomWidth == null && this.CustomHeight == null)
+ {
+ this.errorService.ShowMessageBox("The Custom Width or Height fields must be filled in for the 'Custom' option.", Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);
+ return;
+ }
+
this.Preset.UsePictureFilters = this.Preset.UsePictureFilters;
this.Preset.PictureSettingsMode = this.SelectedPictureSettingMode;
|