From 6abad94d69206b1af2b1bc99771130dc8cf0c3e7 Mon Sep 17 00:00:00 2001 From: Bibiko Date: Tue, 4 Aug 2009 08:13:08 +0000 Subject: =?UTF-8?q?=E2=80=A2=20fixed=20bug=20for=20focus=20setting=20after?= =?UTF-8?q?=20database=20choice=20-=20it=20sets=20the=20focus=20to=20table?= =?UTF-8?q?=20list=20filter=20field=20only=20if=20it's=20visible,=20otherw?= =?UTF-8?q?ise=20it=20sets=20the=20focus=20to=20the=20Table=20List=20view?= =?UTF-8?q?=20directly?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/TableDocument.m | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'Source') 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"]]; + } /** -- cgit v1.2.3