Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
dmoagx committed Mar 3, 2015
1 parent 5f3c003 commit 89fb7e7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Source/SPDatabaseDocument.m
Expand Up @@ -4441,9 +4441,9 @@ - (NSDictionary *) stateIncludingDetails:(NSDictionary *)detailsToReturn
{
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];
Expand Down Expand Up @@ -4482,7 +4482,7 @@ - (NSDictionary *) stateIncludingDetails:(NSDictionary *)detailsToReturn
[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"];
Expand Down

0 comments on commit 89fb7e7

Please sign in to comment.