From 1c3c288b8cc26d8de7119e3fff9b1ad60c9ee63a Mon Sep 17 00:00:00 2001 From: Bibiko Date: Fri, 26 Mar 2010 18:42:57 +0000 Subject: =?UTF-8?q?=E2=80=A2=20Navigator=20and=20completion=20list=20-=20f?= =?UTF-8?q?ixed=20issues=20for=20deletion=20of=20a=20db=20like=20remove=20?= =?UTF-8?q?all=20relevant=20items=20and=20refresh=20the=20navigator=20-=20?= =?UTF-8?q?simplified=20and=20minimized=20code=20and=20memory=20usage=20wh?= =?UTF-8?q?ile=20querying=20the=20connection=20structure=20-=20whether=20a?= =?UTF-8?q?=20schema=20name=20is=20an=20unique=20db=20or=20table=20will=20?= =?UTF-8?q?be=20evaluated=20on=20run-time=20via=20allKeysofDbStructure?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/TableDocument.m | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'Source/TableDocument.m') 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; -- cgit v1.2.3