1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-25 01:03:01 +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]; [fTableView reloadData];
NSInteger selectedRow = [fTableView selectedRow]; if ([fTableView numberOfRows] > 0)
if (selectedRow != -1) {
[fTableView scrollRowToVisible: selectedRow]; if (row == [fTableView numberOfRows])
{
--row;
[fTableView selectRowIndexes: [NSIndexSet indexSetWithIndex: row] byExtendingSelection: NO];
}
[fTableView scrollRowToVisible: row];
}
break; break;
} }