diff --git a/Source/NSTableHeaderView.m b/Source/NSTableHeaderView.m index 4afe3501c..ade1151b9 100644 --- a/Source/NSTableHeaderView.m +++ b/Source/NSTableHeaderView.m @@ -34,6 +34,7 @@ #include #include #include +#include @implementation NSTableHeaderView { @@ -170,7 +171,31 @@ } -(void)mouseDown: (NSEvent*)event { - // TODO + NSPoint location = [event locationInWindow]; + int clickCount; + int columnIndex; + + clickCount = [event clickCount]; + + if (clickCount > 2) + { + return; + } + + location = [self convertPoint: location fromView: nil]; + columnIndex = [self columnAtPoint: location]; + if (columnIndex == -1) + { + return; + } + + if (clickCount == 2) + { + [_tableView _sendDoubleActionForColumn: columnIndex]; + return; + } + + // TODO - simple click events [super mouseDown: event]; } @end