aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2009-03-27 01:30:57 +0000
committerrowanbeentje <rowan@beent.je>2009-03-27 01:30:57 +0000
commita3689bfe638e7141cfd76980fa33010446e06e0d (patch)
treefb5f4f7912c96ebcae8617a31e2990be189ff26a /Source
parentbf968d201fb84b9e2ab11e163df74f19231b2bd3 (diff)
downloadsequelpro-a3689bfe638e7141cfd76980fa33010446e06e0d.tar.gz
sequelpro-a3689bfe638e7141cfd76980fa33010446e06e0d.tar.bz2
sequelpro-a3689bfe638e7141cfd76980fa33010446e06e0d.zip
- 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.
Diffstat (limited to 'Source')
-rw-r--r--Source/TableContent.m8
1 files changed, 2 insertions, 6 deletions
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