aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPDatabaseDocument.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/SPDatabaseDocument.m')
-rw-r--r--Source/SPDatabaseDocument.m4
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/SPDatabaseDocument.m b/Source/SPDatabaseDocument.m
index 505164c3..654f06cd 100644
--- a/Source/SPDatabaseDocument.m
+++ b/Source/SPDatabaseDocument.m
@@ -4481,6 +4481,8 @@ static NSString *SPAlterDatabaseAction = @"SPAlterDatabase";
[connection setObject:[self name] forKey:@"name"];
[connection setObject:[self host] forKey:@"host"];
[connection setObject:[self user] forKey:@"user"];
+ if([connectionController colorIndex])
+ [connection setObject:[NSNumber numberWithInteger:[connectionController colorIndex]] forKey:SPFavoriteColorIndexKey];
if([connectionController port] && [[connectionController port] length])
[connection setObject:[NSNumber numberWithInteger:[[connectionController port] integerValue]] forKey:@"port"];
if([[self database] length])
@@ -4645,6 +4647,8 @@ static NSString *SPAlterDatabaseAction = @"SPAlterDatabase";
[connectionController setHost:[connection objectForKey:@"host"]];
if ([connection objectForKey:@"port"])
[connectionController setPort:[NSString stringWithFormat:@"%ld", (long)[[connection objectForKey:@"port"] integerValue]]];
+ if ([connection objectForKey:SPFavoriteColorIndexKey])
+ [connectionController setColorIndex:[(NSNumber *)[connection objectForKey:SPFavoriteColorIndexKey] integerValue]];
// Set SSL details
if ([connection objectForKey:@"useSSL"])