mirror of https://github.com/odrling/Aegisub
Make it harder for automation script to leave no lines selected
This commit is contained in:
parent
15d26dd86f
commit
84bd682e2e
|
@ -803,6 +803,8 @@ namespace {
|
||||||
AssDialogue *new_active = c->selectionController->GetActiveLine();
|
AssDialogue *new_active = c->selectionController->GetActiveLine();
|
||||||
if (active_line && (active_idx > 0 || !sel.count(new_active)))
|
if (active_line && (active_idx > 0 || !sel.count(new_active)))
|
||||||
new_active = active_line;
|
new_active = active_line;
|
||||||
|
if (sel.empty())
|
||||||
|
sel.insert(new_active);
|
||||||
c->selectionController->SetSelectionAndActive(std::move(sel), new_active);
|
c->selectionController->SetSelectionAndActive(std::move(sel), new_active);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in New Issue