aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax <post@wickenrode.com>2015-02-08 04:40:59 +0100
committerMax <post@wickenrode.com>2015-02-08 04:40:59 +0100
commitb1e32f6583f113c279dcde61f4f531d637118bdd (patch)
tree0c39eb80a01ee9ebd9730a3090b1c2257acff02d
parent19a1c9f81ec1ae6f5518babfb974ad7f01407b16 (diff)
downloadsequelpro-b1e32f6583f113c279dcde61f4f531d637118bdd.tar.gz
sequelpro-b1e32f6583f113c279dcde61f4f531d637118bdd.tar.bz2
sequelpro-b1e32f6583f113c279dcde61f4f531d637118bdd.zip
Fix one case of "SSH input fields cut off"
When the last selected favorite was "Quick Connect" with SSH, on the next launch SSH would be re-selected, but the fields other than SSH Host would be cut off. This was caused by a race condition between our window setup code and Cocoas window restoration code. Solved by disabling window restoration for now (didn't really work for us anyway).
-rw-r--r--Source/SPWindowController.m6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/SPWindowController.m b/Source/SPWindowController.m
index 0666f1a7..58afeb16 100644
--- a/Source/SPWindowController.m
+++ b/Source/SPWindowController.m
@@ -90,6 +90,12 @@ enum {
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(tabDragStarted:) name:PSMTabDragDidBeginNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(tabDragStopped:) name:PSMTabDragDidEndNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_updateLineHidingViewState) name:SPWindowToolbarDidToggleNotification object:nil];
+
+ // Because we are a document-based app we automatically adopt window restoration on 10.7+.
+ // However that causes a race condition with our own window setup code.
+ // Remove this when we actually support restoration.
+ if([[self window] respondsToSelector:@selector(setRestorable:)])
+ [[self window] setRestorable:NO];
}
#pragma mark -