diff options
author | Bibiko <bibiko@eva.mpg.de> | 2009-08-12 06:54:55 +0000 |
---|---|---|
committer | Bibiko <bibiko@eva.mpg.de> | 2009-08-12 06:54:55 +0000 |
commit | 1de2268c7bd3e724a01401074f8e51ce4b1d6274 (patch) | |
tree | 29ff9d1df6d8a87496def5e0f102059ec3b13c3c | |
parent | 8db453b2c23e84e16c492f0a0856463bb866c620 (diff) | |
download | sequelpro-1de2268c7bd3e724a01401074f8e51ce4b1d6274.tar.gz sequelpro-1de2268c7bd3e724a01401074f8e51ce4b1d6274.tar.bz2 sequelpro-1de2268c7bd3e724a01401074f8e51ce4b1d6274.zip |
• bug fix for issue 363: suppress selecting a table header in TablesList by right-click and context menu
-rw-r--r-- | Source/SPTableView.m | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/SPTableView.m b/Source/SPTableView.m index 46f491ad..bff7a923 100644 --- a/Source/SPTableView.m +++ b/Source/SPTableView.m @@ -23,6 +23,7 @@ // More info at <http://code.google.com/p/sequel-pro/> #import "SPTableView.h" +#import "SPArrayAdditions.h" @implementation SPTableView @@ -39,6 +40,13 @@ // Right-click at a row will select that row before ordering out the context menu int row = [self rowAtPoint:[self convertPoint:[event locationInWindow] fromView:nil]]; if(row >= 0 && row < [self numberOfRows]) { + + // Check for TablesList if right-click on header, then suppress context menu + if([[[[self delegate] class] description] isEqualToString:@"TablesList"]) { + if([NSArrayObjectAtIndex([[self delegate] valueForKeyPath:@"tableTypes"], row) intValue] == -1) + return nil; + } + [self selectRow:row byExtendingSelection:NO]; [[self window] makeFirstResponder:self]; } |