fix an oddness with the "insert before" function. patch by Harukalover.

Originally committed to SVN as r2413.
This commit is contained in:
Karl Blomster 2008-10-11 13:28:29 +00:00
parent 2d49a1e833
commit 6dd79d7441
1 changed files with 4 additions and 0 deletions

View File

@ -416,6 +416,10 @@ void SubtitlesGrid::OnInsertBefore (wxCommandEvent &event) {
def->Start.SetMS(0);
def->End = GetDialogue(n)->Start;
}
else if (GetDialogue(n-1)->End.GetMS() > GetDialogue(n)->Start.GetMS()) {
def->Start.SetMS(GetDialogue(n)->Start.GetMS()-Options.AsInt(_T("Timing Default Duration")));
def->End = GetDialogue(n)->Start;
}
else {
def->Start = GetDialogue(n-1)->End;
def->End = GetDialogue(n)->Start;