mirror of https://github.com/odrling/Aegisub
Fix adding lead in/out in the timing postprocessor
The wrong set of lines were being checked for overlaps resulting in completely broken results. Originally committed to SVN as r6345.
This commit is contained in:
parent
2d3e505193
commit
e6252ae11b
|
@ -354,10 +354,10 @@ void DialogTimingProcessor::Process() {
|
|||
for (size_t i = 0; i < sorted.size(); ++i) {
|
||||
AssDialogue *cur = sorted[i];
|
||||
if (addIn)
|
||||
cur->Start = safe_time(sorted.begin() + i + 1, sorted.end(), cur, cur->Start - leadIn, &AssDialogue::End, &std::max<int>);
|
||||
cur->Start = safe_time(sorted.rend() - i, sorted.rend(), cur, cur->Start - leadIn, &AssDialogue::End, &std::max<int>);
|
||||
|
||||
if (addOut)
|
||||
cur->End = safe_time(sorted.rend() - i, sorted.rend(), cur, cur->End + leadOut, &AssDialogue::Start, &std::min<int>);
|
||||
cur->End = safe_time(sorted.begin() + i + 1, sorted.end(), cur, cur->End + leadOut, &AssDialogue::Start, &std::min<int>);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue