aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/TableDocument.m9
1 files changed, 7 insertions, 2 deletions
diff --git a/Source/TableDocument.m b/Source/TableDocument.m
index c2c41a13..d4a4a53d 100644
--- a/Source/TableDocument.m
+++ b/Source/TableDocument.m
@@ -431,8 +431,13 @@
// Add a history entry
[spHistoryControllerInstance updateHistoryEntries];
- // Set focus to table list filter field
- [tableWindow makeFirstResponder:listFilterField];
+ // Set focus to table list filter field if visible
+ // otherwise set focus to Table List view
+ if ( [[tablesListInstance tables] count] > 20 )
+ [tableWindow makeFirstResponder:listFilterField];
+ else
+ [tableWindow makeFirstResponder:[tablesListInstance valueForKeyPath:@"tablesListView"]];
+
}
/**