Permalink
Browse files

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 89fb7e74a72b44a59d15117d4a6a2a9913bee591
Showing with 4 additions and 4 deletions.
  1. +4 −4 Source/SPDatabaseDocument.m
@@ -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];
@@ -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"];

0 comments on commit 89fb7e7

Please sign in to comment.