mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-20 12:59:25 +00:00
Using simpler aproach for modelChange proadcasting by using the document as broadcaster
This commit is contained in:
@@ -7,16 +7,19 @@
|
||||
//
|
||||
|
||||
#import "MPCustomFieldTableCellView.h"
|
||||
#import "MPDocument.h"
|
||||
|
||||
@implementation MPCustomFieldTableCellView
|
||||
|
||||
- (void)setBackgroundStyle:(NSBackgroundStyle)backgroundStyle {
|
||||
[super setBackgroundStyle:NSBackgroundStyleLight];
|
||||
super.backgroundStyle = NSBackgroundStyleLight;
|
||||
}
|
||||
|
||||
- (void)setValue:(id)value forKeyPath:(NSString *)keyPath {
|
||||
NSLog(@"%@ setValue:forKeyPath:%@", NSStringFromClass([self class]), keyPath);
|
||||
if([keyPath hasPrefix:@"objectValue."]) {
|
||||
[self.window.windowController.document willChangeModelProperty];
|
||||
[super setValue:value forKeyPath:keyPath];
|
||||
[self.window.windowController.document didChangeModelProperty];
|
||||
}
|
||||
[super setValue:value forKeyPath:keyPath];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user