mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 05:52:58 +00:00
fixed old values being displayed in reused table cell views
This commit is contained in:
@@ -307,6 +307,8 @@ NSString *const _MPTableSecurCellView = @"PasswordCell";
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
view = [tableView makeViewWithIdentifier:_MPTableStringCellView owner:self];
|
view = [tableView makeViewWithIdentifier:_MPTableStringCellView owner:self];
|
||||||
|
[view.textField unbind:NSValueBinding];
|
||||||
|
view.textField.stringValue = @"";
|
||||||
if(!isModifedColumn) {
|
if(!isModifedColumn) {
|
||||||
/* clean up old formatter that might be left */
|
/* clean up old formatter that might be left */
|
||||||
view.textField.formatter = nil;
|
view.textField.formatter = nil;
|
||||||
@@ -364,9 +366,6 @@ NSString *const _MPTableSecurCellView = @"PasswordCell";
|
|||||||
NSStringFromSelector(@selector(history))];
|
NSStringFromSelector(@selector(history))];
|
||||||
[view.textField bind:NSValueBinding toObject:view withKeyPath:historyCountKeyPath options:nil];
|
[view.textField bind:NSValueBinding toObject:view withKeyPath:historyCountKeyPath options:nil];
|
||||||
}
|
}
|
||||||
else if(isIndexColumn) {
|
|
||||||
view.textField.stringValue = @"";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user