aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/SPCopyTable.m33
-rw-r--r--Source/SPCustomQuery.m3
-rw-r--r--Source/SPTableContent.m3
3 files changed, 21 insertions, 18 deletions
diff --git a/Source/SPCopyTable.m b/Source/SPCopyTable.m
index c8a32f00..513421a0 100644
--- a/Source/SPCopyTable.m
+++ b/Source/SPCopyTable.m
@@ -738,27 +738,36 @@ NSInteger MENU_EDIT_COPY_AS_SQL = 2003;
// RETURN or ENTER invoke editing mode for selected row
// by calling tableView:shouldEditTableColumn: to validate
- if([self numberOfSelectedRows] == 1 && ([theEvent keyCode] == 36 || [theEvent keyCode] == 76)) {
- for(id item in [self tableColumns]) {
- // Run in fieldEditorMode?
- if(![[self delegate] tableView:self shouldEditTableColumn:item row:[self selectedRow]])
- ;
- else {
- [self editColumn:0 row:[self selectedRow] withEvent:nil select:YES];
- break;
+ // TODO: find a better solution HansJB
+ if([self numberOfSelectedRows] == 1 && ([theEvent keyCode] == 36 || [theEvent keyCode] == 76)) {
+ if([[self delegate] isKindOfClass:[SPCustomQuery class]] || [[self delegate] isKindOfClass:[SPTableContent class]]) {
+ ;
+ } else {
+ for(id item in [self tableColumns]) {
+ // Run in fieldEditorMode?
+ if(![[self delegate] tableView:self shouldEditTableColumn:item row:[self selectedRow]])
+ ;
+ else {
+ [self editColumn:0 row:[self selectedRow] withEvent:nil select:YES];
+ break;
+ }
}
}
-
return;
}
-
+
// Check if ESCAPE is hit and use it to cancel row editing if supported
- else if ([theEvent keyCode] == 53 && [[self delegate] respondsToSelector:@selector(cancelRowEditing)])
+ if ([theEvent keyCode] == 53 && [[self delegate] respondsToSelector:@selector(cancelRowEditing)])
{
if ([[self delegate] cancelRowEditing]) return;
}
-
+
+ // TODO: find a better solution HansJB
+ else if ([theEvent keyCode] == 48 && ([[self delegate] isKindOfClass:[SPCustomQuery class]]
+ || [[self delegate] isKindOfClass:[SPTableContent class]])) {
+ return;
+ }
[super keyDown:theEvent];
}
diff --git a/Source/SPCustomQuery.m b/Source/SPCustomQuery.m
index 1a7eeffe..5eea9f6f 100644
--- a/Source/SPCustomQuery.m
+++ b/Source/SPCustomQuery.m
@@ -3599,9 +3599,6 @@
// Call the field editor sheet
[self tableView:customQueryView shouldEditTableColumn:NSArrayObjectAtIndex([customQueryView tableColumns], column) row:row];
- // Reset the field editor
- [customQueryView editColumn:column row:row withEvent:nil select:YES];
-
return NO;
}
diff --git a/Source/SPTableContent.m b/Source/SPTableContent.m
index 0ee639c8..ac76f093 100644
--- a/Source/SPTableContent.m
+++ b/Source/SPTableContent.m
@@ -4204,9 +4204,6 @@
// Call the field editor sheet
[self tableView:tableContentView shouldEditTableColumn:NSArrayObjectAtIndex([tableContentView tableColumns], column) row:row];
- // Reset the field editor
- [tableContentView editColumn:column row:row withEvent:nil select:YES];
-
return NO;
}