Skip to content

Commit

Permalink
Moved tracking of last selected row index to selectRowIndexes: in tab…
Browse files Browse the repository at this point in the history
…leview.
  • Loading branch information
Randall Luecke committed Jun 16, 2010
1 parent 19d5431 commit 7414d14
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions AppKit/CPTableView.j
Expand Up @@ -909,6 +909,9 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5;
else
_selectedRowIndexes = [rows copy];

// update last selected row
_lastSelectedRow = ([rows count] > 0) ? [rows lastIndex] : -1;

[self _updateHighlightWithOldRows:previousSelectedIndexes newRows:_selectedRowIndexes];
[_tableDrawView display]; // FIXME: should be setNeedsDisplayInRect:enclosing rect of new (de)selected rows
// but currently -drawRect: is not implemented here
Expand Down Expand Up @@ -3268,8 +3271,6 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5;
}
}

_lastSelectedRow = ([newSelection count] > 0) ? aRow : -1;

// if empty selection is not allowed and the new selection has nothing selected, abort
if (!_allowsEmptySelection && [newSelection count] === 0)
return;
Expand Down

0 comments on commit 7414d14

Please sign in to comment.