aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorMax <post@wickenrode.com>2017-03-31 02:32:28 +0200
committerMax <post@wickenrode.com>2017-03-31 02:32:28 +0200
commit004af0c9d13d5c9f29b3e0e08ee7df025ee56026 (patch)
tree92df274a41a20570a1ae289646e256066cf517a1 /Source
parent5a201e6cf26b26c6fd3dfab9cb18211e75bada26 (diff)
parent63eb8781018c094644bc1d46099b42ad27f51670 (diff)
downloadsequelpro-004af0c9d13d5c9f29b3e0e08ee7df025ee56026.tar.gz
sequelpro-004af0c9d13d5c9f29b3e0e08ee7df025ee56026.tar.bz2
sequelpro-004af0c9d13d5c9f29b3e0e08ee7df025ee56026.zip
Merge branch 'master' of https://github.com/sequelpro/sequelpro
Diffstat (limited to 'Source')
-rw-r--r--Source/SPDatabaseDocument.m15
1 files changed, 9 insertions, 6 deletions
diff --git a/Source/SPDatabaseDocument.m b/Source/SPDatabaseDocument.m
index 5338d2f7..b57b506f 100644
--- a/Source/SPDatabaseDocument.m
+++ b/Source/SPDatabaseDocument.m
@@ -4474,6 +4474,7 @@ static int64_t SPDatabaseDocumentInstanceCounter = 0;
{
// Coax the main split view into actually checking its constraints
[contentViewSplitter setPosition:[[[contentViewSplitter subviews] objectAtIndex:0] bounds].size.width ofDividerAtIndex:0];
+
// If the task interface is visible, and this tab is frontmost, re-center the task child window
if (_isWorkingLevel && [parentWindowController selectedTableDocument] == self) [self centerTaskWindow];
}
@@ -4482,17 +4483,19 @@ static int64_t SPDatabaseDocumentInstanceCounter = 0;
/**
* Set the parent window
*/
-- (void)setParentWindow:(NSWindow *)aWindow
+- (void)setParentWindow:(NSWindow *)window
{
-#ifndef SP_CODA
+ NSWindow *favoritesOutlineViewWindow = [(NSView *)[connectionController favoritesOutlineView] window];
+
// If the window is being set for the first time - connection controller is visible - update focus
- if (!parentWindow && !mySQLConnection) {
- [aWindow makeFirstResponder:(NSResponder *)[connectionController favoritesOutlineView]];
+ if (!parentWindow && !mySQLConnection && window == favoritesOutlineViewWindow) {
+ [window makeFirstResponder:(NSResponder *)[connectionController favoritesOutlineView]];
}
-#endif
- parentWindow = aWindow;
+ parentWindow = window;
+
SPSSHTunnel *currentTunnel = [connectionController valueForKeyPath:@"sshTunnel"];
+
if (currentTunnel) [currentTunnel setParentWindow:parentWindow];
}