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

@@ -237,12 +237,12 @@ NSString *const _MPTAbleSecurCellView = @"PasswordCell";
view = [tableView makeViewWithIdentifier:_MPTableImageCellView owner:self];
if( isTitleColumn ) {
[[view textField] bind:NSValueBinding toObject:entry withKeyPath:@"title" options:nil];
[[view imageView] setImage:entry.iconImage];
[[view imageView] bind:NSValueBinding toObject:entry withKeyPath:@"iconImage" options:nil];
}
else {
assert(entry.parent);
[[view textField] bind:NSValueBinding toObject:entry.parent withKeyPath:@"name" options:nil];
[[view imageView] setImage:entry.iconImage];
[[view imageView] bind:NSValueBinding toObject:entry.parent withKeyPath:@"iconImage" options:nil];
}
}
else if(isPasswordColum) {