diff options
author | Max Lohrmann <dmoagx@users.noreply.github.com> | 2017-05-30 01:27:36 +0200 |
---|---|---|
committer | Max Lohrmann <dmoagx@users.noreply.github.com> | 2017-05-30 01:27:36 +0200 |
commit | c83f7b115e9cb41f7c92212434096515ac8e6909 (patch) | |
tree | 6b015a29376e2f5c9710920f2b85af31f29b17f0 /Source/SPTableContent.m | |
parent | 35b8b4a488ac3e1a20a3d7dc489e35b773c897f3 (diff) | |
download | sequelpro-c83f7b115e9cb41f7c92212434096515ac8e6909.tar.gz sequelpro-c83f7b115e9cb41f7c92212434096515ac8e6909.tar.bz2 sequelpro-c83f7b115e9cb41f7c92212434096515ac8e6909.zip |
Small changes to PR #2807 and surrounding code
Diffstat (limited to 'Source/SPTableContent.m')
-rw-r--r-- | Source/SPTableContent.m | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Source/SPTableContent.m b/Source/SPTableContent.m index e2895e15..aeac9bc4 100644 --- a/Source/SPTableContent.m +++ b/Source/SPTableContent.m @@ -31,6 +31,7 @@ #import "SPTableContent.h" #import "SPTableContentFilter.h" +#import "SPTableContentDataSource.h" #import "SPDatabaseDocument.h" #import "SPTableStructure.h" #import "SPTableInfo.h" @@ -2382,7 +2383,6 @@ static NSString *SPTableFilterSetDefaultOperator = @"SPTableFilterSetDefaultOper [currentResult addObject:[NSArray arrayWithArray:tempRow]]; - BOOL hexBlobs = [prefs boolForKey: SPDisplayBinaryDataAsHex]; // Add rows for (i = 0; i < [self numberOfRowsInTableView:tableContentView]; i++) { @@ -2390,7 +2390,8 @@ static NSString *SPTableFilterSetDefaultOperator = @"SPTableFilterSetDefaultOper for (NSTableColumn *aTableColumn in tableColumns) { - id o = SPDataStorageObjectAtRowAndColumn(tableValues, i, [[aTableColumn identifier] integerValue]); + NSUInteger columnIndex = [[aTableColumn identifier] integerValue]; + id o = SPDataStorageObjectAtRowAndColumn(tableValues, i, columnIndex); if ([o isNSNull]) { [tempRow addObject:includeNULLs ? [NSNull null] : [prefs objectForKey:SPNullValue]]; @@ -2442,15 +2443,16 @@ static NSString *SPTableFilterSetDefaultOperator = @"SPTableFilterSetDefaultOper } else { NSString *str; - if (hide) + if (hide) { str = @"<BLOB>"; - else if (hexBlobs) { - str = [NSString stringWithFormat: @"0x%@", [o dataToHexString]]; + } + else if ([self cellValueIsDisplayedAsHexForColumn:columnIndex]) { + str = [NSString stringWithFormat:@"0x%@", [o dataToHexString]]; } else { str = [o stringRepresentationUsingEncoding:[mySQLConnection stringEncoding]]; } - [tempRow addObject: str]; + [tempRow addObject:str]; } if(image) [image release]; |