mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-28 10:58:51 +00:00
FIXED: A data view edited in a table view was duplicated after a reload.
Previously in CPTableTView, a view being edited was not cached when unloaded, for example when made invisible after scrolling or when calling -reloadData. This situation was causing a duplicated view to be added at the same place when the data view was loaded again. After this commit, edited data views are cached and resign their first responder status just before they are added to the queue because they can be reused at another place. Test: Added a "reload data" button in ViewBasedCib example.
This commit is contained in:
1 parent
03b663463d
commit
c8b812bbb5
4 files changed
+193
-7
No files matched your search
@@ -3410,12 +3410,14 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
|
||||
if (!dataViews || row >= dataViews.length)
|
||||
continue;
|
||||
|
||||
if (row === _editingRow && column === _editingColumn)
|
||||
[[self window] makeFirstResponder:self];
|
||||
|
||||
var dataView = [dataViews objectAtIndex:row];
|
||||
|
||||
[dataViews replaceObjectAtIndex:row withObject:nil];
|
||||
|
||||
if (row !== _editingRow || column !== _editingColumn)
|
||||
[self _enqueueReusableDataView:dataView];
|
||||
[self _enqueueReusableDataView:dataView];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user