From 87b88b489031f4860a231c24dc1e2bdfe776c2c8 Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Tue, 28 Jul 2009 22:18:30 +0000 Subject: - Clear selection if user is filtering table list with multiple tables selected, to avoid issues --- Source/TablesList.m | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Source/TablesList.m b/Source/TablesList.m index 35240e46..947c2f41 100644 --- a/Source/TablesList.m +++ b/Source/TablesList.m @@ -1835,6 +1835,13 @@ */ - (IBAction) updateFilter:(id)sender { + + // Don't try and maintain selections of multiple rows through filtering + if ([tablesListView numberOfSelectedRows] > 1) { + [tablesListView deselectAll:self]; + if (selectedTableName) [selectedTableName release], selectedTableName = nil; + } + if ([[listFilterField stringValue] length]) { if (isTableListFiltered) { [filteredTables release]; @@ -1887,7 +1894,6 @@ [filteredTableTypes addObject:[NSNumber numberWithInt:selectedTableType]]; } -// [self performSelector:@selector(selectTableAtIndex:) withObject:[NSNumber numberWithInt:[filteredTables indexOfObject:selectedTableName]] afterDelay:0.0]; isTableListFiltered = YES; } else if (isTableListFiltered) { isTableListFiltered = NO; @@ -1895,9 +1901,6 @@ filteredTables = tables; [filteredTableTypes release]; filteredTableTypes = tableTypes; - if (selectedTableName) { -// [self performSelector:@selector(selectTableAtIndex:) withObject:[NSNumber numberWithInt:[tables indexOfObject:selectedTableName]] afterDelay:0.0]; - } } // Reselect correct row and reload the table view display -- cgit v1.2.3