diff options
author | rowanbeentje <rowan@beent.je> | 2011-06-14 00:19:01 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2011-06-14 00:19:01 +0000 |
commit | b4b81b2dd07674b7dc3208e3b79690f66b1bf113 (patch) | |
tree | 712709715094c00668e681e83d0ce91cfb061d26 /Source/SPTablesList.m | |
parent | 876a4e359f72653a4be001b5bb41900253794b58 (diff) | |
download | sequelpro-b4b81b2dd07674b7dc3208e3b79690f66b1bf113.tar.gz sequelpro-b4b81b2dd07674b7dc3208e3b79690f66b1bf113.tar.bz2 sequelpro-b4b81b2dd07674b7dc3208e3b79690f66b1bf113.zip |
- Fix "Multiple selection" still being displayed after multiple tables are deleted
- If multiple tables are selected when opening the SPFieldMapperController select the first to import into
- Clean up tableName in tablesList - now returns nil if no tables are selected or multiple tables are selected, instead of returning an empty string for multiple tables
Diffstat (limited to 'Source/SPTablesList.m')
-rw-r--r-- | Source/SPTablesList.m | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/Source/SPTablesList.m b/Source/SPTablesList.m index e81f78b1..fe43c845 100644 --- a/Source/SPTablesList.m +++ b/Source/SPTablesList.m @@ -760,17 +760,7 @@ static NSString *SPDuplicateTable = @"SPDuplicateTable"; #endif // Update the selected table name and type if (selectedTableName) [selectedTableName release]; - -#ifndef SP_REFACTOR /* ui manipulation */ - if ([indexes count]) { - selectedTableName = [[NSString alloc] initWithString:@""]; - } - else { -#endif - selectedTableName = nil; -#ifndef SP_REFACTOR /* ui manipulation */ - } -#endif + selectedTableName = nil; #ifndef SP_REFACTOR /* ui manipulation */ // Set gear menu items Remove/Duplicate table/view according to the table types @@ -1552,8 +1542,12 @@ static NSString *SPDuplicateTable = @"SPDuplicateTable"; if ([tablesListView numberOfSelectedRows] != 1) { // Ensure the state is cleared - if ([tableDocumentInstance table]) [tableDocumentInstance loadTable:nil ofType:SPTableTypeNone]; - else [self setSelectionState:nil]; + if ([tableDocumentInstance table]) { + [tableDocumentInstance loadTable:nil ofType:SPTableTypeNone]; + } else { + [self setSelectionState:nil]; + [tableInfoInstance tableChanged:nil]; + } if (selectedTableName) [selectedTableName release], selectedTableName = nil; selectedTableType = SPTableTypeNone; return; |