When deleting the last row of the grid, select the new last row rather than nothing.

Originally committed to SVN as r4670.
This commit is contained in:
Thomas Goyne 2010-07-09 07:31:56 +00:00
parent c40aa7080a
commit 4897f35dfc
1 changed files with 4 additions and 0 deletions

View File

@ -1056,6 +1056,10 @@ void SubtitlesGrid::DeleteLines(wxArrayInt target, bool flagModified) {
CommitChanges();
}
if (old_active_line_index >= GetRows()) {
old_active_line_index = GetRows() - 1;
}
// Update selected line
SelectRow(old_active_line_index);
SetActiveLine(GetDialogue(old_active_line_index));