summaryrefslogtreecommitdiffstats
path: root/macosx/HBController.m
diff options
context:
space:
mode:
authorDamiano Galassi <[email protected]>2015-12-05 10:26:01 +0100
committerDamiano Galassi <[email protected]>2015-12-05 10:26:01 +0100
commit19e3852ba50460472faab6493a46180b6adcadf2 (patch)
tree2f716d5026f0d838ea483cb36144b27b839526c1 /macosx/HBController.m
parent6c5bae474590041306d1b0883211c3e0f86f645f (diff)
MacGui: default to custom picture size in the add preset sheet if the current job size is less than the maximum size.
Diffstat (limited to 'macosx/HBController.m')
-rw-r--r--macosx/HBController.m9
1 files changed, 7 insertions, 2 deletions
diff --git a/macosx/HBController.m b/macosx/HBController.m
index a0591bb67..9fcc8d20f 100644
--- a/macosx/HBController.m
+++ b/macosx/HBController.m
@@ -1371,9 +1371,14 @@
- (IBAction)showAddPresetPanel:(id)sender
{
- // Show the add panel
+ BOOL defaultToCustom = ((self.job.picture.width + self.job.picture.cropRight + self.job.picture.cropLeft) < self.job.picture.sourceWidth) ||
+ ((self.job.picture.height + self.job.picture.cropTop + self.job.picture.cropBottom) < self.job.picture.sourceHeight);
+
+ // Show the add panel
HBAddPresetController *addPresetController = [[HBAddPresetController alloc] initWithPreset:[self createPresetFromCurrentSettings]
- videoSize:NSMakeSize(self.job.picture.width, self.job.picture.height)];
+ customWidth:self.job.picture.width
+ customHeight:self.job.picture.height
+ defaultToCustom:defaultToCustom];
[NSApp beginSheet:addPresetController.window modalForWindow:self.window modalDelegate:self didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:) contextInfo:(void *)CFBridgingRetain(addPresetController)];
}