aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TableDump.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/TableDump.m')
-rw-r--r--Source/TableDump.m9
1 files changed, 3 insertions, 6 deletions
diff --git a/Source/TableDump.m b/Source/TableDump.m
index 3edf0619..34ffe262 100644
--- a/Source/TableDump.m
+++ b/Source/TableDump.m
@@ -379,8 +379,8 @@
}
- (IBAction)changeTable:(id)sender
-{
- [tableListView selectRowIndexes:[NSIndexSet indexSetWithIndex:[[tablesListInstance tables] indexOfObject:[fieldMappingPopup titleOfSelectedItem]]] byExtendingSelection:NO];
+{
+ [tablesListInstance selectTableOrViewWithName:[fieldMappingPopup titleOfSelectedItem]];
//set up tableView
currentRow = 0;
@@ -603,12 +603,9 @@
[fieldMappingPopup selectItemAtIndex:0];
}
- int indexOfFirstTable = [[tablesListInstance tables] indexOfObject:[fieldMappingPopup titleOfSelectedItem]];
-
- if( indexOfFirstTable == NSNotFound ){
+ if( ![tablesListInstance selectTableOrViewWithName:[fieldMappingPopup titleOfSelectedItem]] ) {
[errors appendString:[NSString stringWithFormat:NSLocalizedString(@"[ERROR] %@\n", @"error text when trying to import csv data, but we have no tables in the db"), @"Can't import CSV data into a database without any tables!"]];
} else {
- [tableListView selectRowIndexes:[NSIndexSet indexSetWithIndex:indexOfFirstTable] byExtendingSelection:NO];
//set up tableView
currentRow = 0;