From a3689bfe638e7141cfd76980fa33010446e06e0d Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Fri, 27 Mar 2009 01:30:57 +0000 Subject: - Fix exceptions and so saving table column width changes in databases or tables which have already seen a column resized in the past. Looks like r389 incorrectly used arrays instead of dictionaries when cleaning up a memory leak. --- Source/TableContent.m | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'Source') diff --git a/Source/TableContent.m b/Source/TableContent.m index 0a474998..07b7fc9d 100644 --- a/Source/TableContent.m +++ b/Source/TableContent.m @@ -1902,18 +1902,14 @@ objectValueForTableColumn:(NSTableColumn *)aTableColumn if ( [tableColumnWidths objectForKey:database] == nil ) { [tableColumnWidths setObject:[NSMutableDictionary dictionary] forKey:database]; } else { - //[NSMutableArray arrayWithArray:array]; vs [array mutableCopy]; - //[tableColumnWidths setObject:[[tableColumnWidths objectForKey:database] mutableCopy] forKey:database]; - [tableColumnWidths setObject:[NSMutableArray arrayWithArray:[tableColumnWidths objectForKey:database]] forKey:database]; + [tableColumnWidths setObject:[NSMutableDictionary dictionaryWithDictionary:[tableColumnWidths objectForKey:database]] forKey:database]; } // get table object if ( [[tableColumnWidths objectForKey:database] objectForKey:table] == nil ) { [[tableColumnWidths objectForKey:database] setObject:[NSMutableDictionary dictionary] forKey:table]; } else { - //[NSMutableArray arrayWithArray:array]; vs [array mutableCopy]; - //[[tableColumnWidths objectForKey:database] setObject:[[[tableColumnWidths objectForKey:database] objectForKey:table] mutableCopy] forKey:table]; - [[tableColumnWidths objectForKey:database] setObject:[NSMutableArray arrayWithArray:[[tableColumnWidths objectForKey:database] objectForKey:table]] forKey:table]; + [[tableColumnWidths objectForKey:database] setObject:[NSMutableDictionary dictionaryWithDictionary:[[tableColumnWidths objectForKey:database] objectForKey:table]] forKey:table]; } // save column size -- cgit v1.2.3