Added selection observing arraycontroller, moved block based calls into view controllers again

This commit is contained in:
michael starke
2016-08-30 16:25:15 +02:00
parent 8b60e9ec84
commit f3a77bfd2d
12 changed files with 92 additions and 47 deletions

View 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