aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2009-07-28 22:18:30 +0000
committerrowanbeentje <rowan@beent.je>2009-07-28 22:18:30 +0000
commit87b88b489031f4860a231c24dc1e2bdfe776c2c8 (patch)
treed27d5242b7ff8b16bca3a740482ecffd54501502
parentd84c65f6edf98e65b99a55984bf0efb8c23e9ce4 (diff)
downloadsequelpro-87b88b489031f4860a231c24dc1e2bdfe776c2c8.tar.gz
sequelpro-87b88b489031f4860a231c24dc1e2bdfe776c2c8.tar.bz2
sequelpro-87b88b489031f4860a231c24dc1e2bdfe776c2c8.zip
- Clear selection if user is filtering table list with multiple tables selected, to avoid issues
-rw-r--r--Source/TablesList.m11
1 files 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