aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPDatabaseDocument.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/SPDatabaseDocument.m')
-rw-r--r--Source/SPDatabaseDocument.m9
1 files changed, 6 insertions, 3 deletions
diff --git a/Source/SPDatabaseDocument.m b/Source/SPDatabaseDocument.m
index 8286167a..03c4d919 100644
--- a/Source/SPDatabaseDocument.m
+++ b/Source/SPDatabaseDocument.m
@@ -587,9 +587,12 @@ static NSString *SPRenameDatabaseAction = @"SPRenameDatabase";
if ([self database]) [self detectDatabaseEncoding];
- // Set focus to table list filter field if visible
- // otherwise set focus to Table List view
- [[tablesListInstance onMainThread] makeTableListFilterHaveFocus];
+ // If not on the query view, alter initial focus - set focus to table list filter
+ // field if visible, otherwise set focus to Table List view
+ if (![[self selectedToolbarItemIdentifier] isEqualToString:SPMainToolbarCustomQuery]) {
+ [[tablesListInstance onMainThread] makeTableListFilterHaveFocus];
+ }
+
#endif
#ifdef SP_CODA /* glue */
if ( delegate && [delegate respondsToSelector:@selector(databaseDocumentDidConnect:)] )