diff options
author | mltownsend <mltownsend@gmail.com> | 2009-08-25 23:07:20 +0000 |
---|---|---|
committer | mltownsend <mltownsend@gmail.com> | 2009-08-25 23:07:20 +0000 |
commit | b98dc4dc89367dd743d5c8e7e20ca481cc4ec58f (patch) | |
tree | c11937662b0062f151a7c06e4930b9e7a0865433 /Source/SPTableView.m | |
parent | d3fd8895438bee156bf6ac1d2200edc801e01966 (diff) | |
download | sequelpro-b98dc4dc89367dd743d5c8e7e20ca481cc4ec58f.tar.gz sequelpro-b98dc4dc89367dd743d5c8e7e20ca481cc4ec58f.tar.bz2 sequelpro-b98dc4dc89367dd743d5c8e7e20ca481cc4ec58f.zip |
Made it so that SPTableView and SPOutlineView will respond to enter or return being hit when a row is selected and go into edit mode.
Diffstat (limited to 'Source/SPTableView.m')
-rw-r--r-- | Source/SPTableView.m | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Source/SPTableView.m b/Source/SPTableView.m index bff7a923..f6af2c16 100644 --- a/Source/SPTableView.m +++ b/Source/SPTableView.m @@ -54,4 +54,20 @@ return [self menu]; } +-(BOOL)acceptsFirstResponder +{ + return YES; +} + +- (void)keyDown:(NSEvent *)theEvent +{ + if([self numberOfSelectedRows] == 1 && ([theEvent keyCode] == 36 || [theEvent keyCode] == 76)) + { + [self editColumn:0 row:[self selectedRow] withEvent:nil select:YES]; + } + else { + [super keyDown:theEvent]; + } +} + @end |