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:
parent
63913686d5
commit
1c39a8e290
2 changed files with 6 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -791,6 +791,11 @@
|
|||
return [outlineView rowHeight];
|
||||
}
|
||||
|
||||
- (BOOL) outlineView: (NSOutlineView *) outlineView shouldSelectItem: (id) item
|
||||
{
|
||||
return item != nil;
|
||||
}
|
||||
|
||||
- (NSArray *) peerSortDescriptors
|
||||
{
|
||||
NSMutableArray * descriptors = [NSMutableArray array];
|
||||
|
|
Loading…
Reference in a new issue