Fixed column drag and drop in the tableview.

This commit is contained in:
Randall Luecke committed 2013-02-18 04:00:40 -05:00
1 parent 4a09feed59
commit 5427e9a402
1 file changed
+8 -1
+8 -1
View File
@@ -980,9 +980,16 @@ NOT YET IMPLEMENTED
if (_draggedColumn === aColumn)
return;
var previouslyDraggedColumn = _draggedColumn;
_draggedColumn = aColumn;
[self reloadDataForRowIndexes:_exposedRows columnIndexes:[CPIndexSet indexSetWithIndex:[_tableColumns indexOfObject:aColumn]]];
// if a column is currently being dragged, update that column (removing data views)
if (aColumn)
[self reloadDataForRowIndexes:_exposedRows columnIndexes:[CPIndexSet indexSetWithIndex:[_tableColumns indexOfObject:aColumn]]];
// when the column is dropped, we should also update it.
if (previouslyDraggedColumn)
[self reloadDataForRowIndexes:_exposedRows columnIndexes:[CPIndexSet indexSetWithIndex:[_tableColumns indexOfObject:previouslyDraggedColumn]]];
}
/*