diff options
author | stuconnolly <stuart02@gmail.com> | 2010-12-05 15:03:28 +0000 |
---|---|---|
committer | stuconnolly <stuart02@gmail.com> | 2010-12-05 15:03:28 +0000 |
commit | 4e87089af2ce50364a3e6fcfdf8a3c31e172d8aa (patch) | |
tree | 88ff9ede1a8fb612cd4fbf7a4f90b7cbc8f10f34 /Source/SPFavoritesOutlineView.m | |
parent | 93b889667f1b938931b84e8fed07ee58bcba3c8f (diff) | |
download | sequelpro-4e87089af2ce50364a3e6fcfdf8a3c31e172d8aa.tar.gz sequelpro-4e87089af2ce50364a3e6fcfdf8a3c31e172d8aa.tar.bz2 sequelpro-4e87089af2ce50364a3e6fcfdf8a3c31e172d8aa.zip |
Apply new favorites outline view patch.
Diffstat (limited to 'Source/SPFavoritesOutlineView.m')
-rw-r--r-- | Source/SPFavoritesOutlineView.m | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Source/SPFavoritesOutlineView.m b/Source/SPFavoritesOutlineView.m index 6930c281..4a47b3db 100644 --- a/Source/SPFavoritesOutlineView.m +++ b/Source/SPFavoritesOutlineView.m @@ -52,6 +52,19 @@ return [self menu]; } +- (void)keyDown:(NSEvent *)event +{ + // Enter or Return initiates a connection to the selected favorite, which is the same as double-clicking + // one, so call the same selector. + if (([self numberOfSelectedRows] == 1) && (([event keyCode] == 36) || ([event keyCode] == 76))) { + [[self delegate] performSelector:[self doubleAction]]; + + return; + } + + [super keyDown:event]; +} + /** * To prevent right-clicking in a column's 'group' heading, ask the delegate if we support selecting it * as this normally doesn't apply to left-clicks. If we do support selecting this row, simply pass on the event. |