diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/SPTableRelations.m | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/SPTableRelations.m b/Source/SPTableRelations.m index 2374ea81..5734a96d 100644 --- a/Source/SPTableRelations.m +++ b/Source/SPTableRelations.m @@ -376,7 +376,13 @@ static NSString *SPRelationOnDeleteKey = @"on_delete"; - (id)tableView:(NSTableView *)tableView objectValueForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)rowIndex { - return [[relationData objectAtIndex:rowIndex] objectForKey:[tableColumn identifier]]; + id data = [[relationData objectAtIndex:rowIndex] objectForKey:[tableColumn identifier]]; + //dim the database name if it matches the current database + if([[tableColumn identifier] isEqualToString:SPRelationFKDatabaseKey] && [[tableDocumentInstance database] isEqual:data]) { + NSDictionary *textAttributes = @{NSForegroundColorAttributeName: [NSColor lightGrayColor]}; + data = [[[NSAttributedString alloc] initWithString:(NSString *)data attributes:textAttributes] autorelease]; + } + return data; } #pragma mark - |