aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorMax <post@wickenrode.com>2014-11-29 01:36:55 +0100
committerMax <post@wickenrode.com>2014-11-29 01:36:55 +0100
commitbdcda6621f31db4e2c03387a881b91b1834f964f (patch)
treeccf6f487e0bc6704329ae21400aacbdc3b90f28e /Source
parentd3c7343286c226aedf9726edacbd4137a9406caf (diff)
downloadsequelpro-bdcda6621f31db4e2c03387a881b91b1834f964f.tar.gz
sequelpro-bdcda6621f31db4e2c03387a881b91b1834f964f.tar.bz2
sequelpro-bdcda6621f31db4e2c03387a881b91b1834f964f.zip
Include tab color when duplicating tab.
Fixes #2029
Diffstat (limited to 'Source')
-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"])