diff options
author | Max <post@wickenrode.com> | 2015-11-06 00:26:12 +0100 |
---|---|---|
committer | Max <post@wickenrode.com> | 2015-11-06 00:26:12 +0100 |
commit | 5cd12392fa26ab93303b6b6b43de5a1a31a834f7 (patch) | |
tree | 3b121d3577cbe8a1053597a258ca1263d99c30e1 /Source/SPWindowController.m | |
parent | ba4469e78d664751b4da2d2d62db16163e838208 (diff) | |
download | sequelpro-5cd12392fa26ab93303b6b6b43de5a1a31a834f7.tar.gz sequelpro-5cd12392fa26ab93303b6b6b43de5a1a31a834f7.tar.bz2 sequelpro-5cd12392fa26ab93303b6b6b43de5a1a31a834f7.zip |
* Change window creation to use a create-and-get model instead of create-then-get as that did cause problems on 10.11 in some cases (#2294)
backport of ea1d72868aabba227aa608a2a89079aa12ac70a1
Diffstat (limited to 'Source/SPWindowController.m')
-rw-r--r-- | Source/SPWindowController.m | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Source/SPWindowController.m b/Source/SPWindowController.m index 68c89ad8..963919d0 100644 --- a/Source/SPWindowController.m +++ b/Source/SPWindowController.m @@ -104,6 +104,11 @@ enum { */ - (IBAction)addNewConnection:(id)sender { + [self addNewConnection]; +} + +- (SPDatabaseDocument *)addNewConnection +{ // Create a new database connection view SPDatabaseDocument *newTableDocument = [[SPDatabaseDocument alloc] init]; @@ -125,8 +130,8 @@ enum { // Bind the tab bar's progress display to the document [self _updateProgressIndicatorForItem:newItem]; - - [newTableDocument release]; + + return [newTableDocument autorelease]; } /** |