From 82439bd6c54d64a130c74e9c2dfec66e65de043a Mon Sep 17 00:00:00 2001 From: Bibiko Date: Sun, 22 Aug 2010 14:22:11 +0000 Subject: =?UTF-8?q?=E2=80=A2=20moved=20changes=20done=20in=20r=202566=20to?= =?UTF-8?q?=20tableViewSelectionDidChange:=20if=20no=20item=20in=20tablesL?= =?UTF-8?q?ist=20is=20selected=20to=20reset=20SP?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/SPTablesList.m | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/Source/SPTablesList.m b/Source/SPTablesList.m index 0d4ef643..7ae16742 100644 --- a/Source/SPTablesList.m +++ b/Source/SPTablesList.m @@ -1493,6 +1493,18 @@ { if([tablesListView selectedRow] < 0) { + // Reset all + if (selectedTableName) [selectedTableName release]; + selectedTableName = nil; + selectedTableType = SPTableTypeNone; + [tableSourceInstance loadTable:nil]; + [tableContentInstance loadTable:nil]; + [extendedTableInfoInstance loadTable:nil]; + [tableTriggersInstance loadTriggers]; + structureLoaded = NO; + contentLoaded = NO; + statusLoaded = NO; + triggersLoaded = NO; [self updateSelectionWithTaskString:NSLocalizedString(@"Reloading...", @"Reloading table task string")]; return; } @@ -2075,10 +2087,6 @@ [tablesListView reloadData]; - // Reset selectedTableName and selectedTableType - if (selectedTableName) [selectedTableName release]; - selectedTableName = nil; - selectedTableType = SPTableTypeNone; [tablesListView deselectAll:self]; // set window title -- cgit v1.2.3