aboutsummaryrefslogtreecommitdiffstats
path: root/TablesList.m
diff options
context:
space:
mode:
Diffstat (limited to 'TablesList.m')
-rw-r--r--TablesList.m14
1 files changed, 8 insertions, 6 deletions
diff --git a/TablesList.m b/TablesList.m
index 500ac349..40ea87c5 100644
--- a/TablesList.m
+++ b/TablesList.m
@@ -543,12 +543,12 @@ traps enter and esc and edit/cancel without entering next row
}
}
-/*
-loads a table in content or source view (if tab selected)
-*/
+/**
+ * Loads a table in content or source view (if tab selected)
+ */
- (void)tableViewSelectionDidChange:(NSNotification *)aNotification
{
- if ( [tablesListView numberOfSelectedRows] == 1 ) {
+ if ( [tablesListView numberOfSelectedRows] == 1 ) {
if ( [tabView indexOfTabViewItem:[tabView selectedTabViewItem]] == 0 ) {
[tableSourceInstance loadTable:[tables objectAtIndex:[tablesListView selectedRow]]];
structureLoaded = YES;
@@ -575,6 +575,10 @@ loads a table in content or source view (if tab selected)
[tableWindow setTitle:[NSString stringWithFormat:@"(MySQL %@) %@@%@/%@/%@", [tableDocumentInstance mySQLVersion], [tableDocumentInstance user],
[tableDocumentInstance host], [tableDocumentInstance database], [tables objectAtIndex:[tablesListView selectedRow]]]];
+ // Update connection characater set encoding based on the table's encoding if required
+ if ([[[NSUserDefaults standardUserDefaults] objectForKey:@"encoding"] isEqualToString:@"Autodetect"]) {
+ [tableDocumentInstance detectTableEncodingForTable:[tables objectAtIndex:[tablesListView selectedRow]]];
+ }
} else {
[tableSourceInstance loadTable:nil];
[tableContentInstance loadTable:nil];
@@ -589,8 +593,6 @@ loads a table in content or source view (if tab selected)
}
}
-
-
- (BOOL)tableView:(NSTableView *)aTableView shouldSelectRow:(int)rowIndex
{
return (rowIndex != 0);