aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2013-03-10 02:36:12 +0000
committerrowanbeentje <rowan@beent.je>2013-03-10 02:36:12 +0000
commitf551b70055c726fc2c96d93acfe3dfd1ac6c1f31 (patch)
treea2cd6bd7b06909350bbb4c7991404ddff0dd0d60
parent550b3cce18d319a26ca9fe2359ea68746ae089b5 (diff)
downloadsequelpro-f551b70055c726fc2c96d93acfe3dfd1ac6c1f31.tar.gz
sequelpro-f551b70055c726fc2c96d93acfe3dfd1ac6c1f31.tar.bz2
sequelpro-f551b70055c726fc2c96d93acfe3dfd1ac6c1f31.zip
- If the Custom Query editor view is active on window open, correctly set the focus in it, addressing Issue #1590
-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:)] )