diff options
author | Bibiko <bibiko@eva.mpg.de> | 2010-03-25 19:44:59 +0000 |
---|---|---|
committer | Bibiko <bibiko@eva.mpg.de> | 2010-03-25 19:44:59 +0000 |
commit | c6779c7de40f38c8ff7f8d8ffa7c649164921556 (patch) | |
tree | 0913f34b374d14d72a8b95c47e0f208fdb0c003d /Source/TablesList.m | |
parent | 9163b4ff5779f2abc03855542448f5a01d5f23e4 (diff) | |
download | sequelpro-c6779c7de40f38c8ff7f8d8ffa7c649164921556.tar.gz sequelpro-c6779c7de40f38c8ff7f8d8ffa7c649164921556.tar.bz2 sequelpro-c6779c7de40f38c8ff7f8d8ffa7c649164921556.zip |
• changed behaviour of ^⌥⌘F "Filter Table" or "Change Focus to Table List"
- if > 20 tables are listed it sets the focus on the search field
- if <= 20 it sets the focus on the table list, and - if no selection - it selects the first table item
- this fixes i597
Diffstat (limited to 'Source/TablesList.m')
-rw-r--r-- | Source/TablesList.m | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Source/TablesList.m b/Source/TablesList.m index 76e653be..6ef3d315 100644 --- a/Source/TablesList.m +++ b/Source/TablesList.m @@ -1609,7 +1609,15 @@ */ - (void) makeTableListFilterHaveFocus { - [tableWindow makeFirstResponder:listFilterField]; + if([tables count] > 20) { + [tableWindow makeFirstResponder:listFilterField]; + } + else if([tables count] > 2) { + [tableWindow makeFirstResponder:tablesListView]; + if([tablesListView numberOfSelectedRows] < 1) + [tablesListView selectRowIndexes:[NSIndexSet indexSetWithIndex:1] byExtendingSelection:NO]; + + } } /** |