diff options
author | avenjamin <avenjamin@gmail.com> | 2009-02-18 04:43:30 +0000 |
---|---|---|
committer | avenjamin <avenjamin@gmail.com> | 2009-02-18 04:43:30 +0000 |
commit | 1dae450e32b269cb95c47a4274de9641ea0e779a (patch) | |
tree | df34db5c5893cc5c0d1fc37fa64e2e9a7f740c9e | |
parent | b1809a297076acdf1d5f56f7b81b6c1bbfaf7538 (diff) | |
download | sequelpro-1dae450e32b269cb95c47a4274de9641ea0e779a.tar.gz sequelpro-1dae450e32b269cb95c47a4274de9641ea0e779a.tar.bz2 sequelpro-1dae450e32b269cb95c47a4274de9641ea0e779a.zip |
Fixed Issue #168
Choose Database popup button now reverts to current database when cancelling the "Add Database…" dialog.
-rw-r--r-- | Source/TableDocument.m | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/TableDocument.m b/Source/TableDocument.m index 78f29d24..6969e561 100644 --- a/Source/TableDocument.m +++ b/Source/TableDocument.m @@ -512,8 +512,10 @@ NSString *TableDocumentFavoritesControllerFavoritesDidChange = @"TableDocumentFa [NSApp endSheet:databaseSheet]; [databaseSheet orderOut:nil]; - if (!code) + if (!code) { + (![self database]) ? [chooseDatabaseButton selectItemAtIndex:0] : [chooseDatabaseButton selectItemWithTitle:[self database]]; return; + } if ([[databaseNameField stringValue] isEqualToString:@""]) { NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil, NSLocalizedString(@"Database must have a name.", @"message of panel when no db name is given")); |