diff options
-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;
|