From bdcda6621f31db4e2c03387a881b91b1834f964f Mon Sep 17 00:00:00 2001 From: Max Date: Sat, 29 Nov 2014 01:36:55 +0100 Subject: Include tab color when duplicating tab. Fixes #2029 --- Source/SPDatabaseDocument.m | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Source/SPDatabaseDocument.m') 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"]) -- cgit v1.2.3