diff options
author | rowanbeentje <rowan@beent.je> | 2009-02-28 02:23:17 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2009-02-28 02:23:17 +0000 |
commit | 497aa0b00521383ca497db4c1c42b63b3fb32f9d (patch) | |
tree | ae88ca94937e8c2453379bc256dfae30d0d42345 /Source/TableDocument.m | |
parent | 52784a1b02f5ff32bc8d9661d948d2ebee93f610 (diff) | |
download | sequelpro-497aa0b00521383ca497db4c1c42b63b3fb32f9d.tar.gz sequelpro-497aa0b00521383ca497db4c1c42b63b3fb32f9d.tar.bz2 sequelpro-497aa0b00521383ca497db4c1c42b63b3fb32f9d.zip |
- Improve handling of disconnections made while selecting a database, fixing a crasher when suffering from network issues
- When prompting for an export filename, only select the filename for editing and not the extension
- Remove timing debug from CSV export
Diffstat (limited to 'Source/TableDocument.m')
-rw-r--r-- | Source/TableDocument.m | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/TableDocument.m b/Source/TableDocument.m index 1e3537b2..f8c6bc73 100644 --- a/Source/TableDocument.m +++ b/Source/TableDocument.m @@ -483,8 +483,10 @@ NSString *TableDocumentFavoritesControllerFavoritesDidChange = @"TableDocumentFa // show error on connection failed if ( ![mySQLConnection selectDB:[chooseDatabaseButton titleOfSelectedItem]] ) { - NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil, [NSString stringWithFormat:NSLocalizedString(@"Unable to connect to database %@.\nBe sure that you have the necessary privileges.", @"message of panel when connection to db failed after selecting from popupbutton"), [chooseDatabaseButton titleOfSelectedItem]]); - [self setDatabases:self]; + if ( [mySQLConnection isConnected] ) { + NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil, [NSString stringWithFormat:NSLocalizedString(@"Unable to connect to database %@.\nBe sure that you have the necessary privileges.", @"message of panel when connection to db failed after selecting from popupbutton"), [chooseDatabaseButton titleOfSelectedItem]]); + [self setDatabases:self]; + } return; } |