Fix a bug that would cause a crash under certain conditions when trying to change the properties of a recently deleted line. Patch by Plorkyeran, closes #815
Originally committed to SVN as r2858.
This commit is contained in:
parent
32eb3a8a62
commit
76cec3ec29
1 changed files with 4 additions and 2 deletions
|
@ -1047,8 +1047,10 @@ void SubtitlesGrid::DeleteLines(wxArrayInt target) {
|
||||||
ass->FlagAsModified(_("delete"));
|
ass->FlagAsModified(_("delete"));
|
||||||
CommitChanges();
|
CommitChanges();
|
||||||
|
|
||||||
// Update editbox
|
// Update selected line
|
||||||
editBox->SetToLine(MID(0,editBox->linen,GetRows()-1));
|
int newSelected = MID(0, editBox->linen,GetRows() - 1);
|
||||||
|
editBox->SetToLine(newSelected);
|
||||||
|
SelectRow(newSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue