]> granicus.if.org Git - handbrake/commitdiff
MacGui: set PictureWidth and PictureHeight when creating presets with the "Source...
authorDamiano Galassi <damiog@gmail.com>
Wed, 28 Dec 2016 07:35:18 +0000 (08:35 +0100)
committerDamiano Galassi <damiog@gmail.com>
Wed, 28 Dec 2016 07:35:18 +0000 (08:35 +0100)
macosx/HBAddPresetController.m

index 9c82e4087593ff420c98cff71db7388b868ada1a..3cdce5cb043d0549d9691f88f1a889043ffdf080 100644 (file)
@@ -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;