forked from mia/Aegisub
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
|
@ -1056,6 +1056,10 @@ void SubtitlesGrid::DeleteLines(wxArrayInt target, bool flagModified) {
|
||||||
CommitChanges();
|
CommitChanges();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (old_active_line_index >= GetRows()) {
|
||||||
|
old_active_line_index = GetRows() - 1;
|
||||||
|
}
|
||||||
|
|
||||||
// Update selected line
|
// Update selected line
|
||||||
SelectRow(old_active_line_index);
|
SelectRow(old_active_line_index);
|
||||||
SetActiveLine(GetDialogue(old_active_line_index));
|
SetActiveLine(GetDialogue(old_active_line_index));
|
||||||
|
|
Loading…
Reference in a new issue