1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-23 16:24:02 +00:00

when removing the bottom group, select the group above it instead of the first group

This commit is contained in:
Mitchell Livingston 2010-04-10 15:48:09 +00:00
parent 7a086ec6df
commit 6b84271314

View file

@ -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;
}