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:
parent
c40aa7080a
commit
4897f35dfc
1 changed files with 4 additions and 0 deletions
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue