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:
Alexandre Wilhelm committed 2013-06-03 11:27:10 -07:00
1 parent 50d3bfd456
commit c7c3bdd543
1 file changed
+3
+3
View File
@@ -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) ||