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
1 changed files with 10 additions and 3 deletions

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