From b4b81b2dd07674b7dc3208e3b79690f66b1bf113 Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Tue, 14 Jun 2011 00:19:01 +0000 Subject: - 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 --- Source/SPTablesList.m | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) (limited to 'Source/SPTablesList.m') 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; -- cgit v1.2.3