aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/SPCustomQuery.m12
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/SPCustomQuery.m b/Source/SPCustomQuery.m
index 9289f2ce..9dce1f70 100644
--- a/Source/SPCustomQuery.m
+++ b/Source/SPCustomQuery.m
@@ -2111,7 +2111,10 @@
- (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)rowIndex
{
if (aTableView == customQueryView) {
- return [self _resultDataItemAtRow:rowIndex columnIndex:[[tableColumn identifier] integerValue] preserveNULLs:NO asPreview:YES];
+ NSUInteger columnIndex = [[tableColumn identifier] integerValue];
+ // if a user enters the field by keyboard navigation they might want to copy the contents without invoking the field editor sheet first
+ BOOL forEditing = ([customQueryView editedColumn] == (NSInteger)columnIndex && [customQueryView editedRow] == rowIndex);
+ return [self _resultDataItemAtRow:rowIndex columnIndex:[[tableColumn identifier] integerValue] preserveNULLs:NO asPreview:(forEditing != YES)];
}
return @"";
@@ -3988,6 +3991,7 @@
*/
- (id)_resultDataItemAtRow:(NSInteger)row columnIndex:(NSUInteger)column preserveNULLs:(BOOL)preserveNULLs asPreview:(BOOL)asPreview;
{
+#warning duplicate code with SPTableContentDataSource.m tableView:objectValueForTableColumn:…
id value = nil;
// While the table is being loaded, additional validation is required - data
@@ -3998,11 +4002,7 @@
pthread_mutex_lock(&resultDataLock);
if (row < resultDataCount && column < [resultData columnCount]) {
- if (asPreview) {
- value = SPDataStoragePreviewAtRowAndColumn(resultData, row, column, 150);
- } else {
- value = SPDataStorageObjectAtRowAndColumn(resultData, row, column);
- }
+ value = SPDataStoragePreviewAtRowAndColumn(resultData, row, column, 150);
}
pthread_mutex_unlock(&resultDataLock);