diff options
-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]; } |