Using bindings for iconImage for instant updates

Icon setting now gets registered via NSUndoManager
Refactored iconId property
This commit is contained in:
michael starke
2013-12-04 01:57:54 +01:00
parent c59ce56f4d
commit fa52de144c
6 changed files with 12 additions and 12 deletions

View File

@@ -15,13 +15,13 @@
@implementation KPKNode (IconImage)
+ (NSSet *)keyPathsForValuesAffectingIconImage {
return [NSSet setWithArray:@[@"customIcon", @"icon"]];
return [NSSet setWithArray:@[@"customIcon", @"iconId"]];
}
- (NSImage *)iconImage {
if(self.customIcon) {
return self.customIcon.image;
}
return [MPIconHelper icon:(MPIconType)self.icon];
return [MPIconHelper icon:(MPIconType)self.iconId];
}
@end