diff options
author | rowanbeentje <rowan@beent.je> | 2010-06-05 23:51:54 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2010-06-05 23:51:54 +0000 |
commit | abfba8d070eca98f602a25722b27eff44a613a40 (patch) | |
tree | 554488e511dda9155fb43108c78560678d650225 /Source/SPDatabaseDocument.m | |
parent | d2fc07c38b51c6fa0f27586e52eee668d5bf2add (diff) | |
download | sequelpro-abfba8d070eca98f602a25722b27eff44a613a40.tar.gz sequelpro-abfba8d070eca98f602a25722b27eff44a613a40.tar.bz2 sequelpro-abfba8d070eca98f602a25722b27eff44a613a40.zip |
- Tweak initial window load to select the correct favourite, also applying focus correctly
Diffstat (limited to 'Source/SPDatabaseDocument.m')
-rw-r--r-- | Source/SPDatabaseDocument.m | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/SPDatabaseDocument.m b/Source/SPDatabaseDocument.m index c91a5c08..d5ebb24c 100644 --- a/Source/SPDatabaseDocument.m +++ b/Source/SPDatabaseDocument.m @@ -3972,6 +3972,12 @@ */ - (void)setParentWindow:(NSWindow *)aWindow { + // If the window is being set for the first time - connection controller is visible - update focus + if (!parentWindow && !mySQLConnection) { + [aWindow makeFirstResponder:[connectionController valueForKey:@"favoritesTable"]]; + [connectionController performSelector:@selector(updateFavoriteSelection:) withObject:self afterDelay:0.0]; + } + parentWindow = aWindow; SPSSHTunnel *currentTunnel = [connectionController valueForKeyPath:@"sshTunnel"]; if (currentTunnel) [currentTunnel setParentWindow:parentWindow]; |