aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2010-08-22 13:49:32 +0000
committerBibiko <bibiko@eva.mpg.de>2010-08-22 13:49:32 +0000
commitabe4da81161dbf106545a8130af3557d843a10ab (patch)
treee622041e0349cb7e4517180598890ffaeb200001 /Source
parent5bc3071de5ca8a27b2be1daa007d2ba9d7896b56 (diff)
downloadsequelpro-abe4da81161dbf106545a8130af3557d843a10ab.tar.gz
sequelpro-abe4da81161dbf106545a8130af3557d843a10ab.tar.bz2
sequelpro-abe4da81161dbf106545a8130af3557d843a10ab.zip
• after deleting of items in tablesList set selectedTableType to SPTableTypeNone and selectedTableName since the table will be deselectAll
- fixes various updates like title bar etc. and avoid crashes/exceptions
Diffstat (limited to 'Source')
-rw-r--r--Source/SPTablesList.m9
1 files changed, 7 insertions, 2 deletions
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]];