aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/CMCopyTable.m6
-rw-r--r--Source/SPTableView.m15
2 files changed, 18 insertions, 3 deletions
diff --git a/Source/CMCopyTable.m b/Source/CMCopyTable.m
index c28a5a3a..fadbe57d 100644
--- a/Source/CMCopyTable.m
+++ b/Source/CMCopyTable.m
@@ -418,13 +418,13 @@ int MENU_EDIT_COPY_AS_SQL = 2002;
if([tableContentView numberOfSelectedRows] == 1 && ([theEvent keyCode] == 36 || [theEvent keyCode] == 76)) {
if([[self delegate] tableView:tableContentView shouldEditTableColumn:[[tableContentView tableColumns] objectAtIndex:0] row:[tableContentView selectedRow]]) {
[self editColumn:0 row:[self selectedRow] withEvent:nil select:YES];
- return;
}
}
-
+ } else {
+ [super keyDown:theEvent];
}
- [super keyDown:theEvent];
+
}
diff --git a/Source/SPTableView.m b/Source/SPTableView.m
index 4d97b6bb..cf93f143 100644
--- a/Source/SPTableView.m
+++ b/Source/SPTableView.m
@@ -59,4 +59,19 @@
return YES;
}
+- (void)keyDown:(NSEvent *)theEvent
+{
+ // Check if ENTER or RETURN is hit and edit the column.
+ if([self numberOfSelectedRows] == 1 && ([theEvent keyCode] == 36 || [theEvent keyCode] == 76))
+ {
+ if (![[[[self delegate] class] description] isEqualToString:@"CustomQuery"]){
+ [self editColumn:0 row:[self selectedRow] withEvent:nil select:YES];
+ return;
+ }
+ }
+
+ [super keyDown:theEvent];
+
+}
+
@end