diff options
Diffstat (limited to 'Source/SPTableView.m')
-rw-r--r-- | Source/SPTableView.m | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/SPTableView.m b/Source/SPTableView.m index 8255f9c1..c19678db 100644 --- a/Source/SPTableView.m +++ b/Source/SPTableView.m @@ -87,9 +87,19 @@ - (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)) { + + // ENTER or RETURN closes the SPFieldMapperController sheet by sending an object with the tag 1 + if([[[[self delegate] class] description] isEqualToString:@"SPFieldMapperController"]) { + NSButton *b = [[[NSButton alloc] init] autorelease]; + [b setTag:1]; + [[self delegate] closeSheet:b]; + return; + } + if (![[[[self delegate] class] description] isEqualToString:@"SPCustomQuery"] && ![[[[self delegate] class] description] isEqualToString:@"SPQueryFavoriteManager"]){ |