aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2010-11-01 13:44:16 +0000
committerstuconnolly <stuart02@gmail.com>2010-11-01 13:44:16 +0000
commitb39f7d5d692432c503358ce6b5a6f104164cab6c (patch)
tree1fd4f988f71c3ebaa8a0461ed251c8e4340c3ea6
parente7a050e4426b519885e826fe50b4db54177dceda (diff)
downloadsequelpro-b39f7d5d692432c503358ce6b5a6f104164cab6c.tar.gz
sequelpro-b39f7d5d692432c503358ce6b5a6f104164cab6c.tar.bz2
sequelpro-b39f7d5d692432c503358ce6b5a6f104164cab6c.zip
Beforing asking SPTableView's delegate if we can right-click a particular row, remember to check that the delegate actually implements the method we are using. Fixes an issue when right-clicking an index in the table structure view, spotted by Hans.
-rw-r--r--Source/SPTableView.m7
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/SPTableView.m b/Source/SPTableView.m
index d1aa5700..fd9c09d0 100644
--- a/Source/SPTableView.m
+++ b/Source/SPTableView.m
@@ -137,7 +137,12 @@
*/
- (void)rightMouseDown:(NSEvent *)event
{
- if ([[self delegate] tableView:self shouldSelectRow:[self rowAtPoint:[self convertPoint:[event locationInWindow] fromView:nil]]]) {
+ if ([[self delegate] respondsToSelector:@selector(tableView:shouldSelectRow:)]) {
+ if ([[self delegate] tableView:self shouldSelectRow:[self rowAtPoint:[self convertPoint:[event locationInWindow] fromView:nil]]]) {
+ [super rightMouseDown:event];
+ }
+ }
+ else {
[super rightMouseDown:event];
}
}