Set the Row for dialogue lines added to keep the file non-empty

This commit is contained in:
Thomas Goyne 2015-05-06 10:28:18 -08:00
parent 4d4102fcb3
commit d2958e6aca
1 changed files with 3 additions and 1 deletions

View File

@ -325,8 +325,10 @@ void SubsController::OnCommit(AssFileCommit c) {
// Make sure the file has at least one style and one dialogue line
if (context->ass->Styles.empty())
context->ass->Styles.push_back(*new AssStyle);
if (context->ass->Events.empty())
if (context->ass->Events.empty()) {
context->ass->Events.push_back(*new AssDialogue);
context->ass->Events.back().Row = 0;
}
redo_stack.clear();