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

@@ -179,11 +179,11 @@ typedef NS_ENUM(NSUInteger, MPContentTab) {
BOOL useDefault = (viewController.selectedIcon == -1);
switch (self.activeTab) {
case MPGroupTab:
document.selectedGroup.icon = useDefault ? MPIconFolder : viewController.selectedIcon;
document.selectedGroup.iconId = useDefault ? [KPKGroup defaultIcon] : viewController.selectedIcon;
break;
case MPEntryTab:
document.selectedEntry.icon = useDefault ? MPIconPassword : viewController.selectedIcon;
document.selectedEntry.iconId = useDefault ? [KPKEntry defaultIcon]: viewController.selectedIcon;
break;
default: