fixed old values being displayed in reused table cell views

This commit is contained in:
michael starke
2017-09-27 18:05:41 +02:00
parent c3739ea6b6
commit e9f00a68b4

View File

@@ -307,6 +307,8 @@ NSString *const _MPTableSecurCellView = @"PasswordCell";
}
else {
view = [tableView makeViewWithIdentifier:_MPTableStringCellView owner:self];
[view.textField unbind:NSValueBinding];
view.textField.stringValue = @"";
if(!isModifedColumn) {
/* clean up old formatter that might be left */
view.textField.formatter = nil;
@@ -364,9 +366,6 @@ NSString *const _MPTableSecurCellView = @"PasswordCell";
NSStringFromSelector(@selector(history))];
[view.textField bind:NSValueBinding toObject:view withKeyPath:historyCountKeyPath options:nil];
}
else if(isIndexColumn) {
view.textField.stringValue = @"";
}
}
return view;
}