aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax <post@wickenrode.com>2016-03-05 04:40:40 +0100
committerMax <post@wickenrode.com>2016-03-05 04:40:40 +0100
commit737add47a8a3875b2a855597cb63f915fb0ba93b (patch)
treeb689547f671b19a8e3820e67dcee8ca8e355f2d7
parent0ac1ebf15c11f4b283a3d8a001b41f568c491876 (diff)
downloadsequelpro-737add47a8a3875b2a855597cb63f915fb0ba93b.tar.gz
sequelpro-737add47a8a3875b2a855597cb63f915fb0ba93b.tar.bz2
sequelpro-737add47a8a3875b2a855597cb63f915fb0ba93b.zip
Change some risky behavior (might be related to #2432)
-rw-r--r--Source/SPDatabaseDocument.m7
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/SPDatabaseDocument.m b/Source/SPDatabaseDocument.m
index 62fe2357..0d766bff 100644
--- a/Source/SPDatabaseDocument.m
+++ b/Source/SPDatabaseDocument.m
@@ -3084,7 +3084,9 @@ static int64_t SPDatabaseDocumentInstanceCounter = 0;
- (void)saveConnectionPanelDidEnd:(NSSavePanel *)panel returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo
{
- if (returnCode) {
+ [panel orderOut:nil]; // by default OS X hides the panel only after the current method is done
+
+ if (returnCode == NSFileHandlingPanelOKButton) {
NSString *fileName = [[panel URL] path];
NSError *error = nil;
@@ -3120,7 +3122,8 @@ static int64_t SPDatabaseDocumentInstanceCounter = 0;
[self saveDocumentWithFilePath:fileName inBackground:NO onlyPreferences:NO contextInfo:nil];
// Manually loaded nibs don't have their top-level objects released automatically - do that here.
- SPClear(saveConnectionAccessory);
+ [saveConnectionAccessory autorelease];
+ saveConnectionAccessory = nil;
if(contextInfo == @"saveSPFfileAndClose")
[self closeAndDisconnect];