don't allow selection/context menu for empty row when no torrent in selected

This commit is contained in:
Mitchell Livingston 2007-01-20 03:32:35 +00:00
parent 63913686d5
commit 1c39a8e290
2 changed files with 6 additions and 1 deletions

View File

@ -48,7 +48,7 @@
if (row >= 0)
{
if (![self isRowSelected: row])
if ([self itemAtRow: row] && ![self isRowSelected: row])
[self selectRowIndexes: [NSIndexSet indexSetWithIndex: row] byExtendingSelection: NO];
}
else

View File

@ -791,6 +791,11 @@
return [outlineView rowHeight];
}
- (BOOL) outlineView: (NSOutlineView *) outlineView shouldSelectItem: (id) item
{
return item != nil;
}
- (NSArray *) peerSortDescriptors
{
NSMutableArray * descriptors = [NSMutableArray array];