mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-20 21:49:22 +00:00
Fixed: CPTableView Drag and drop in void causes a crash
Previously the drag and drop and multiple selection from a void cells caused an exception. With this fix, you can start a drag/drop and a multiple selection from a empty row. Fixes #1857
This commit is contained in:
1 parent
50d3bfd456
commit
c7c3bdd543
1 file changed
+3
@@ -4965,6 +4965,9 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
|
||||
}
|
||||
else if (_allowsMultipleSelection)
|
||||
{
|
||||
if (_selectionAnchorRow == CPNotFound)
|
||||
_selectionAnchorRow = [self numberOfRows] - 1;
|
||||
|
||||
newSelection = [CPIndexSet indexSetWithIndexesInRange:CPMakeRange(MIN(aRow, _selectionAnchorRow), ABS(aRow - _selectionAnchorRow) + 1)];
|
||||
shouldExtendSelection = [self mouseDownFlags] & CPShiftKeyMask &&
|
||||
((_lastSelectedRow == [_selectedRowIndexes lastIndex] && aRow > _lastSelectedRow) ||
|
||||
|
||||
Reference in new issue
Block a user