From f3f1f72ae2148bf724cdcfb5b89adee8292bd6a0 Mon Sep 17 00:00:00 2001 From: Aparajita Fishman Date: Fri, 26 Jul 2013 12:17:52 -0400 Subject: [PATCH] Fixed: variable move in previous commit broke selection notifications. --- AppKit/CPTableView.j | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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]; }