diff --git a/AppKit/CPTableView.j b/AppKit/CPTableView.j index 65df51ca3..e6e4928db 100644 --- a/AppKit/CPTableView.j +++ b/AppKit/CPTableView.j @@ -2381,14 +2381,14 @@ NOT YET IMPLEMENTED if (hangingSelections > 0) { + // For optimal performance, only send a notification if indices were actually removed. + var previousSelectionCount = [_selectedRowIndexes count]; + [_selectedRowIndexes removeIndexesInRange:CPMakeRange(_numberOfRows, hangingSelections)]; if (![_selectedRowIndexes containsIndex:[self selectedRow]]) _lastSelectedRow = CPNotFound; - // For optimal performance, only send a notification if indices were actually removed. - var previousSelectionCount = [_selectedRowIndexes count]; - if (previousSelectionCount > [_selectedRowIndexes count]) [self _noteSelectionDidChange]; }