summaryrefslogtreecommitdiffstats
path: root/macosx/HBController.m
diff options
context:
space:
mode:
authorDamiano Galassi <[email protected]>2020-10-05 13:26:25 +0200
committerDamiano Galassi <[email protected]>2020-10-05 13:26:25 +0200
commit680f58d109e536317ad8bffdf5eb4a6af80107bd (patch)
treed16f12434c21de83c359b0ee00ef9fc465e4254a /macosx/HBController.m
parent5c254bfa75ffcaaed1b0ff84e95e4133a49e9a98 (diff)
MacGui: rename the 'Dimensions' popup to 'Resolution limit' in the add preset sheet, fixed an issue when the source size is bigger than the selected resolution limit.
Diffstat (limited to 'macosx/HBController.m')
-rw-r--r--macosx/HBController.m11
1 files changed, 4 insertions, 7 deletions
diff --git a/macosx/HBController.m b/macosx/HBController.m
index 35bda00b5..72af75bdd 100644
--- a/macosx/HBController.m
+++ b/macosx/HBController.m
@@ -41,7 +41,7 @@
static void *HBControllerScanCoreContext = &HBControllerScanCoreContext;
static void *HBControllerLogLevelContext = &HBControllerLogLevelContext;
-@interface HBController () <HBPresetsViewControllerDelegate, HBTitleSelectionDelegate, NSDraggingDestination, NSPopoverDelegate>
+@interface HBController () <HBPresetsViewControllerDelegate, HBTitleSelectionDelegate, NSMenuItemValidation, NSDraggingDestination, NSPopoverDelegate>
{
IBOutlet NSTabView *fMainTabView;
@@ -1454,15 +1454,12 @@ static void *HBControllerLogLevelContext = &HBControllerLogLevelContext;
{
[self.window HB_endEditing];
- 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]
presetManager:presetManager
- customWidth:self.job.picture.width
- customHeight:self.job.picture.height
- defaultToCustom:defaultToCustom];
+ customWidth:self.job.picture.maxWidth
+ customHeight:self.job.picture.maxHeight
+ resolutionLimitMode:self.job.picture.resolutionLimitMode];
[self.window beginSheet:addPresetController.window completionHandler:^(NSModalResponse returnCode) {
if (returnCode == NSModalResponseOK)