From d4ef8601fd21fb9044fd01623d6afe958aa6d300 Mon Sep 17 00:00:00 2001 From: Bibiko Date: Thu, 9 Sep 2010 15:38:34 +0000 Subject: =?UTF-8?q?=E2=80=A2=20Structure=20-=20reset=20collation=20if=20en?= =?UTF-8?q?coding=20was=20changed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/SPTableStructure.m | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Source/SPTableStructure.m b/Source/SPTableStructure.m index 16c01b6f..ce21b705 100644 --- a/Source/SPTableStructure.m +++ b/Source/SPTableStructure.m @@ -1290,6 +1290,14 @@ returns a dictionary containing enum/set field names as key and possible values currentlyEditingRow = rowIndex; } + // Reset collation if encoding was changed + if([[aTableColumn identifier] isEqualToString:@"encoding"]) { + if([[[tableFields objectAtIndex:rowIndex] objectForKey:@"encoding"] integerValue] != [anObject integerValue]) { + [[tableFields objectAtIndex:rowIndex] setObject:[NSNumber numberWithInteger:0] forKey:@"collation"]; + [tableSourceView reloadData]; + } + } + [[tableFields objectAtIndex:rowIndex] setObject:(anObject) ? anObject : @"" forKey:[aTableColumn identifier]]; } -- cgit v1.2.3