From 1dae450e32b269cb95c47a4274de9641ea0e779a Mon Sep 17 00:00:00 2001 From: avenjamin Date: Wed, 18 Feb 2009 04:43:30 +0000 Subject: Fixed Issue #168 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Choose Database popup button now reverts to current database when cancelling the "Add Database…" dialog. --- Source/TableDocument.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Source') 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")); -- cgit v1.2.3