From abe4da81161dbf106545a8130af3557d843a10ab Mon Sep 17 00:00:00 2001 From: Bibiko Date: Sun, 22 Aug 2010 13:49:32 +0000 Subject: =?UTF-8?q?=E2=80=A2=20after=20deleting=20of=20items=20in=20tables?= =?UTF-8?q?List=20set=20selectedTableType=20to=20SPTableTypeNone=20and=20s?= =?UTF-8?q?electedTableName=20since=20the=20table=20will=20be=20deselectAl?= =?UTF-8?q?l=20-=20fixes=20various=20updates=20like=20title=20bar=20etc.?= =?UTF-8?q?=20and=20avoid=20crashes/exceptions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/SPTablesList.m | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'Source') diff --git a/Source/SPTablesList.m b/Source/SPTablesList.m index bd3d82b6..0d4ef643 100644 --- a/Source/SPTablesList.m +++ b/Source/SPTablesList.m @@ -2074,11 +2074,16 @@ } [tablesListView reloadData]; - + + // Reset selectedTableName and selectedTableType + if (selectedTableName) [selectedTableName release]; + selectedTableName = nil; + selectedTableType = SPTableTypeNone; + [tablesListView deselectAll:self]; + // set window title [tableDocumentInstance updateWindowTitle:self]; - [tablesListView deselectAll:self]; // Query the structure of all databases in the background (mainly for completion) [NSThread detachNewThreadSelector:@selector(queryDbStructureWithUserInfo:) toTarget:mySQLConnection withObject:[NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:YES], @"forceUpdate", nil]]; -- cgit v1.2.3