mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 11:42:30 +00:00
Added selection observing arraycontroller, moved block based calls into view controllers again
This commit is contained in:
26
MacPass/MPArrayController.m
Normal file
26
MacPass/MPArrayController.m
Normal file
@@ -0,0 +1,26 @@
|
||||
//
|
||||
// MPArrayController.m
|
||||
// MacPass
|
||||
//
|
||||
// Created by Michael Starke on 30/08/16.
|
||||
// Copyright © 2016 HicknHack Software GmbH. All rights reserved.
|
||||
//
|
||||
|
||||
#import "MPArrayController.h"
|
||||
#import "MPDocument.h"
|
||||
|
||||
@implementation MPArrayController
|
||||
|
||||
|
||||
- (void)setValue:(id)value forKeyPath:(NSString *)keyPath {
|
||||
if([keyPath hasPrefix:@"selection."]) {
|
||||
[self.document willChangeModelProperty];
|
||||
[super setValue:value forKeyPath:keyPath];
|
||||
[self.document didChangeModelProperty];
|
||||
}
|
||||
else {
|
||||
[super setValue:value forKeyPath:keyPath];
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user