mirror of
https://github.com/transmission/transmission
synced 2024-12-24 08:43:27 +00:00
when removing the bottom group, select the group above it instead of the first group
This commit is contained in:
parent
7a086ec6df
commit
6b84271314
1 changed files with 10 additions and 3 deletions
|
@ -168,9 +168,16 @@
|
|||
|
||||
[fTableView reloadData];
|
||||
|
||||
NSInteger selectedRow = [fTableView selectedRow];
|
||||
if (selectedRow != -1)
|
||||
[fTableView scrollRowToVisible: selectedRow];
|
||||
if ([fTableView numberOfRows] > 0)
|
||||
{
|
||||
if (row == [fTableView numberOfRows])
|
||||
{
|
||||
--row;
|
||||
[fTableView selectRowIndexes: [NSIndexSet indexSetWithIndex: row] byExtendingSelection: NO];
|
||||
}
|
||||
|
||||
[fTableView scrollRowToVisible: row];
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue