replace depreciated selectRow:byExtendingSelection: method

This commit is contained in:
Nathan Kinsinger
2010-02-13 11:58:03 -07:00
parent eff7dab6b2
commit 4ea04358ba
2 changed files with 6 additions and 4 deletions
+2 -2
View File
@@ -67,9 +67,9 @@
}
[sourceView PBExpandItem:item expandParents:YES];
NSInteger index = [sourceView rowForItem:item];
NSIndexSet *index = [NSIndexSet indexSetWithIndex:[sourceView rowForItem:item]];
[sourceView selectRow:index byExtendingSelection:NO];
[sourceView selectRowIndexes:index byExtendingSelection:NO];
}
- (void)addRevSpec:(PBGitRevSpecifier *)rev
+4 -2
View File
@@ -70,8 +70,10 @@
int row = [self rowAtPoint:mousePoint];
// figure out if the row that was just clicked on is currently selected
if ([selectedRowIndexes containsIndex:row] == NO)
[self selectRow:row byExtendingSelection:NO];
if ([selectedRowIndexes containsIndex:row] == NO) {
NSIndexSet *index = [NSIndexSet indexSetWithIndex:row];
[self selectRowIndexes:index byExtendingSelection:NO];
}
}
return [controller contextMenuForTreeView];