robin / ichm

iChm is a CHM reader for Mac OS X

This URL has Read+Write access

ichm / CHMOutlineView.m
100644 26 lines (18 sloc) 0.567 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
//
// CHMOutlineView.m
// ichm
//
// Created by Robin Lu on 7/28/08.
// Copyright 2008 __MyCompanyName__. All rights reserved.
//
 
#import "CHMOutlineView.h"
 
 
@implementation CHMOutlineView
- (void)rightMouseDown:(NSEvent *)theEvent {
NSPoint p = [self convertPoint:[theEvent locationInWindow] fromView:nil];
 
int i = [self rowAtPoint:p];
 
if (i < [self numberOfRows] && ![[self selectedRowIndexes] containsIndex:i]) {
[self selectRowIndexes:[NSIndexSet indexSetWithIndex:i] byExtendingSelection:NO];
}
 
[super rightMouseDown:theEvent];
}
 
@end