mirror of https://github.com/odrling/Aegisub
Fix validation for Make Lines Continuous
Originally committed to SVN as r5741.
This commit is contained in:
parent
cc9cc6d713
commit
6895e91e7c
|
@ -71,16 +71,18 @@ namespace {
|
||||||
SelectionController<AssDialogue>::Selection sel = c->selectionController->GetSelectedSet();
|
SelectionController<AssDialogue>::Selection sel = c->selectionController->GetSelectedSet();
|
||||||
if (sel.size() < 2) return false;
|
if (sel.size() < 2) return false;
|
||||||
|
|
||||||
bool found = false;
|
size_t found = 0;
|
||||||
for (entryIter it = c->ass->Line.begin(); it != c->ass->Line.end(); ++it) {
|
for (entryIter it = c->ass->Line.begin(); it != c->ass->Line.end(); ++it) {
|
||||||
AssDialogue *diag = dynamic_cast<AssDialogue*>(*it);
|
AssDialogue *diag = dynamic_cast<AssDialogue*>(*it);
|
||||||
if (!diag) continue;
|
if (!diag) continue;
|
||||||
|
|
||||||
if (sel.count(diag)) {
|
if (sel.count(diag)) {
|
||||||
found = true;
|
++found;
|
||||||
|
if (found == sel.size())
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
else if (found) {
|
else if (found)
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue