aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPDatabaseDocument.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/SPDatabaseDocument.m')
-rw-r--r--Source/SPDatabaseDocument.m6
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];