From 89fb7e74a72b44a59d15117d4a6a2a9913bee591 Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 3 Mar 2015 21:08:20 +0100 Subject: 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). --- Source/SPDatabaseDocument.m | 8 ++++---- 1 file 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"]; -- cgit v1.2.3