forked from mia/Aegisub
Fix validation for Make Lines Continuous
Originally committed to SVN as r5741.
This commit is contained in:
parent
cc9cc6d713
commit
6895e91e7c
1 changed files with 6 additions and 4 deletions
|
@ -71,16 +71,18 @@ 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 a new issue