diff options
author | Max <post@wickenrode.com> | 2015-03-03 21:08:20 +0100 |
---|---|---|
committer | Max <post@wickenrode.com> | 2015-03-03 21:08:20 +0100 |
commit | 89fb7e74a72b44a59d15117d4a6a2a9913bee591 (patch) | |
tree | ae1901a61339d1c661a1a1e58c0be961f5f95c04 /Source | |
parent | 5f3c003919903c597b2d6aeb7fcc064b0d6d9ef3 (diff) | |
download | sequelpro-89fb7e74a72b44a59d15117d4a6a2a9913bee591.tar.gz sequelpro-89fb7e74a72b44a59d15117d4a6a2a9913bee591.tar.bz2 sequelpro-89fb7e74a72b44a59d15117d4a6a2a9913bee591.zip |
Fix an issue with connection color and cloned connections
The red (first) connection color would not be duplicated to another tab, when choosing "Open Table in New X" from the context menu (issue reported by Kyle via e-mail).
Diffstat (limited to 'Source')
-rw-r--r-- | Source/SPDatabaseDocument.m | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/SPDatabaseDocument.m b/Source/SPDatabaseDocument.m index a14a6f03..7f531f60 100644 --- a/Source/SPDatabaseDocument.m +++ b/Source/SPDatabaseDocument.m @@ -4441,9 +4441,9 @@ static NSString *SPAlterDatabaseAction = @"SPAlterDatabase"; { BOOL returnConnection = [[detailsToReturn objectForKey:@"connection"] boolValue]; BOOL includePasswords = [[detailsToReturn objectForKey:@"password"] boolValue]; - BOOL returnSession = [[detailsToReturn objectForKey:@"session"] boolValue]; - BOOL returnHistory = [[detailsToReturn objectForKey:@"history"] boolValue]; - BOOL returnQuery = [[detailsToReturn objectForKey:@"query"] boolValue]; + BOOL returnSession = [[detailsToReturn objectForKey:@"session"] boolValue]; + BOOL returnHistory = [[detailsToReturn objectForKey:@"history"] boolValue]; + BOOL returnQuery = [[detailsToReturn objectForKey:@"query"] boolValue]; if (!returnConnection && !returnSession && !returnHistory && !returnQuery) return nil; NSMutableDictionary *stateDetails = [NSMutableDictionary dictionary]; @@ -4482,7 +4482,7 @@ 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]) + if([connectionController colorIndex] >= 0) [connection setObject:[NSNumber numberWithInteger:[connectionController colorIndex]] forKey:SPFavoriteColorIndexKey]; if([connectionController port] && [[connectionController port] length]) [connection setObject:[NSNumber numberWithInteger:[[connectionController port] integerValue]] forKey:@"port"]; |