diff options
author | Bibiko <bibiko@eva.mpg.de> | 2009-08-04 08:13:08 +0000 |
---|---|---|
committer | Bibiko <bibiko@eva.mpg.de> | 2009-08-04 08:13:08 +0000 |
commit | 6abad94d69206b1af2b1bc99771130dc8cf0c3e7 (patch) | |
tree | 1347bc85d03310b08f5e5d5ab3eb0eafaf8d88d5 /Source | |
parent | e4272ce9fba25abc8b52f7e8240f14f589547ffb (diff) | |
download | sequelpro-6abad94d69206b1af2b1bc99771130dc8cf0c3e7.tar.gz sequelpro-6abad94d69206b1af2b1bc99771130dc8cf0c3e7.tar.bz2 sequelpro-6abad94d69206b1af2b1bc99771130dc8cf0c3e7.zip |
• fixed bug for focus setting after database choice
- it sets the focus to table list filter field only if it's visible, otherwise it sets the focus to the Table List view directly
Diffstat (limited to 'Source')
-rw-r--r-- | Source/TableDocument.m | 9 |
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"]]; + } /** |