diff options
author | Max <post@wickenrode.com> | 2014-11-11 02:47:32 +0100 |
---|---|---|
committer | Max <post@wickenrode.com> | 2014-11-11 02:47:32 +0100 |
commit | 69ca4afe9ba4c9c710b69e4d22d32d22a007c8a9 (patch) | |
tree | c8beabbf65afbaa3afa6dff27e4a9151a2015909 /Source/SPDatabaseDocument.m | |
parent | 6d48720a8279e7e97e9a225aab34c0688abd8e00 (diff) | |
download | sequelpro-69ca4afe9ba4c9c710b69e4d22d32d22a007c8a9.tar.gz sequelpro-69ca4afe9ba4c9c710b69e4d22d32d22a007c8a9.tar.bz2 sequelpro-69ca4afe9ba4c9c710b69e4d22d32d22a007c8a9.zip |
Attempt to fix #1961
Namely this commit changes two things:
1) In the past the user manager window technically was closed after it was released (SPUserManager.m:491):
[NSApp endSheet:[self window] returnCode:0]; //-> calls delegate, which calls release
[[self window] orderOut:self];
This call order has now been swapped.
2) Because the delegate is invoked directly by NSApp, the release was called before other UI elements had finished their cleanup from orderOut:. The delegate callback is now put on the runloop to give other stuff priority.
Requesting QA on this commit.
Diffstat (limited to 'Source/SPDatabaseDocument.m')
-rw-r--r-- | Source/SPDatabaseDocument.m | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/Source/SPDatabaseDocument.m b/Source/SPDatabaseDocument.m index 9a736f90..b8d6dd83 100644 --- a/Source/SPDatabaseDocument.m +++ b/Source/SPDatabaseDocument.m @@ -2483,16 +2483,10 @@ static NSString *SPAlterDatabaseAction = @"SPAlterDatabase"; return; } - [NSApp beginSheet:[userManagerInstance window] - modalForWindow:parentWindow - modalDelegate:self - didEndSelector:@selector(userManagerSheetDidEnd:returnCode:contextInfo:) - contextInfo:nil]; -} - -- (void)userManagerSheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(void*)context -{ - [userManagerInstance release], userManagerInstance = nil; + [userManagerInstance beginSheetModalForWindow:parentWindow + completionHandler:^(){ + [userManagerInstance release], userManagerInstance = nil; + }]; } /** |