diff options
author | Damiano Galassi <[email protected]> | 2020-09-28 14:53:50 +0200 |
---|---|---|
committer | Damiano Galassi <[email protected]> | 2020-09-28 14:53:50 +0200 |
commit | e9ed112a73e26f1636cf4c3e4ab7860fe125ce31 (patch) | |
tree | 350d2797855aec887eff96296c1b1892e02b2799 /macosx/HBPictureViewController.m | |
parent | 32474ffae290dd82f233fe62d2dc39c47693e7a7 (diff) |
MacGui: remove the modulus popup button.
Diffstat (limited to 'macosx/HBPictureViewController.m')
-rw-r--r-- | macosx/HBPictureViewController.m | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/macosx/HBPictureViewController.m b/macosx/HBPictureViewController.m index ae18cf38f..e517888f8 100644 --- a/macosx/HBPictureViewController.m +++ b/macosx/HBPictureViewController.m @@ -27,20 +27,10 @@ static void *HBPictureViewControllerContext = &HBPictureViewControllerContext; if (self) { _labelColor = [NSColor disabledControlTextColor]; - [self addObserver:self forKeyPath:@"self.picture.modulus" options:NSKeyValueObservingOptionInitial context:HBPictureViewControllerContext]; } return self; } -- (void)dealloc -{ - @try - { - [self removeObserver:self forKeyPath:@"self.picture.modulus" context:HBPictureViewControllerContext]; - } - @catch (NSException * __unused exception) {} -} - - (void)setPicture:(HBPicture *)picture { _picture = picture; @@ -56,24 +46,4 @@ static void *HBPictureViewControllerContext = &HBPictureViewControllerContext; } -#pragma mark - KVO - -- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context -{ - if (context == HBPictureViewControllerContext) - { - // Set the increment here, it's not possible with bindings. - if ([keyPath isEqualToString:@"self.picture.modulus"]) - { - [self.widthStepper setIncrement:self.picture.modulus]; - [self.heightStepper setIncrement:self.picture.modulus]; - } - } - else - { - [super observeValueForKeyPath:keyPath ofObject:object change:change context:context]; - } -} - - @end |