1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-25 09:13:06 +00:00

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];