From 19e3852ba50460472faab6493a46180b6adcadf2 Mon Sep 17 00:00:00 2001 From: Damiano Galassi Date: Sat, 5 Dec 2015 10:26:01 +0100 Subject: MacGui: default to custom picture size in the add preset sheet if the current job size is less than the maximum size. --- macosx/HBController.m | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'macosx/HBController.m') 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)]; } -- cgit v1.2.3