mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 15:12:21 +00:00
Using bindings for iconImage for instant updates
Icon setting now gets registered via NSUndoManager Refactored iconId property
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user