forked from mia/Aegisub
Fix issues with showing the previous inactive line
The "previous" line for the first line was actually the last line of the file, and the previous line for the second line was ignored entirely. Closes #1719.
This commit is contained in:
parent
3e9bb94126
commit
2eb211f5b6
1 changed files with 8 additions and 6 deletions
|
@ -739,10 +739,13 @@ void AudioTimingControllerDialogue::RegenerateInactiveLines()
|
||||||
if (current_line == context->ass->Events.end())
|
if (current_line == context->ass->Events.end())
|
||||||
break;
|
break;
|
||||||
|
|
||||||
auto prev = current_line;
|
if (current_line != context->ass->Events.begin())
|
||||||
while (--prev != context->ass->Events.begin() && !predicate(*prev)) ;
|
{
|
||||||
if (prev != context->ass->Events.begin())
|
auto prev = current_line;
|
||||||
AddInactiveLine(sel, &*prev);
|
while (--prev != context->ass->Events.begin() && !predicate(*prev)) ;
|
||||||
|
if (predicate(*prev))
|
||||||
|
AddInactiveLine(sel, &*prev);
|
||||||
|
}
|
||||||
|
|
||||||
if (mode == 2)
|
if (mode == 2)
|
||||||
{
|
{
|
||||||
|
@ -789,8 +792,7 @@ void AudioTimingControllerDialogue::RegenerateSelectedLines()
|
||||||
selected_lines.clear();
|
selected_lines.clear();
|
||||||
|
|
||||||
AssDialogue *active = context->selectionController->GetActiveLine();
|
AssDialogue *active = context->selectionController->GetActiveLine();
|
||||||
SubtitleSelection const& sel = context->selectionController->GetSelectedSet();
|
for (auto line : context->selectionController->GetSelectedSet())
|
||||||
for (auto line : sel)
|
|
||||||
{
|
{
|
||||||
if (line == active) continue;
|
if (line == active) continue;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue