aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2010-03-26 18:42:57 +0000
committerBibiko <bibiko@eva.mpg.de>2010-03-26 18:42:57 +0000
commit1c3c288b8cc26d8de7119e3fff9b1ad60c9ee63a (patch)
tree7605916f55725a00f1a9010cbde5845b7ba346fb /Source
parente9d49cbf9c48cbbff682c3f5f2e71c7c7a9e3b91 (diff)
downloadsequelpro-1c3c288b8cc26d8de7119e3fff9b1ad60c9ee63a.tar.gz
sequelpro-1c3c288b8cc26d8de7119e3fff9b1ad60c9ee63a.tar.bz2
sequelpro-1c3c288b8cc26d8de7119e3fff9b1ad60c9ee63a.zip
• Navigator and completion list
- fixed issues for deletion of a db like remove all relevant items and refresh the navigator - simplified and minimized code and memory usage while querying the connection structure - whether a schema name is an unique db or table will be evaluated on run-time via allKeysofDbStructure
Diffstat (limited to 'Source')
-rw-r--r--Source/TableDocument.m8
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/TableDocument.m b/Source/TableDocument.m
index 1b39a9c4..8663cc21 100644
--- a/Source/TableDocument.m
+++ b/Source/TableDocument.m
@@ -4098,7 +4098,13 @@
return;
}
- [[SPNavigatorController sharedNavigatorController] removeDatabase:[self database] forConnectionID:[self connectionID]];
+ // Remove db from navigator and completion list array,
+ // do to threading we have to delete it from 'allDatabases' directly
+ // before calling navigator
+ [allDatabases removeObject:[self database]];
+ // This only deletes the db and refreshes the navigator since nothing is changed
+ // that's why we can run this on main thread
+ [mySQLConnection queryDbStructureAndForceUpdate:nil];
// Delete was successful
if (selectedDatabase) [selectedDatabase release], selectedDatabase = nil;