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,17 +71,19 @@ namespace {
|
|||
SelectionController<AssDialogue>::Selection sel = c->selectionController->GetSelectedSet();
|
||||
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) {
|
||||
AssDialogue *diag = dynamic_cast<AssDialogue*>(*it);
|
||||
if (!diag) continue;
|
||||
|
||||
if (sel.count(diag)) {
|
||||
found = true;
|
||||
++found;
|
||||
if (found == sel.size())
|
||||
return true;
|
||||
}
|
||||
else if (found) {
|
||||
else if (found)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue