From b477d5923b1fc896e344f2cc1e3807773c704a13 Mon Sep 17 00:00:00 2001 From: Damiano Galassi Date: Wed, 28 Dec 2016 08:35:18 +0100 Subject: MacGui: set PictureWidth and PictureHeight when creating presets with the "Source Maximum" picture option. Fixes #455 (cherry picked from commit e2cc12cf1dfa9ae3d98661a9ead330f496da3f2f) --- macosx/HBAddPresetController.m | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'macosx') diff --git a/macosx/HBAddPresetController.m b/macosx/HBAddPresetController.m index 9c82e4087..3cdce5cb0 100644 --- a/macosx/HBAddPresetController.m +++ b/macosx/HBAddPresetController.m @@ -154,12 +154,20 @@ typedef NS_ENUM(NSUInteger, HBAddPresetControllerMode) { newPreset.name = self.name.stringValue; newPreset.presetDescription = self.desc.stringValue; - // Get the picture size - newPreset[@"PictureWidth"] = @(self.picWidth.integerValue); - newPreset[@"PictureHeight"] = @(self.picHeight.integerValue); + if (self.picSettingsPopUp.selectedTag == HBAddPresetControllerModeSourceMaximum) + { + newPreset[@"PictureWidth"] = @0; + newPreset[@"PictureHeight"] = @0; + } + else + { + // Get the user set picture size + newPreset[@"PictureWidth"] = @(self.picWidth.integerValue); + newPreset[@"PictureHeight"] = @(self.picHeight.integerValue); + } //Get the whether or not to apply pic Size and Cropping (includes Anamorphic) - newPreset[@"UsesPictureSettings"] = @(self.picSettingsPopUp.selectedItem.tag); + newPreset[@"UsesPictureSettings"] = @(self.picSettingsPopUp.selectedTag); // Always use Picture Filter settings for the preset newPreset[@"UsesPictureFilters"] = @YES; -- cgit v1.2.3