MCPcopy Create free account
hub / github.com/TypesettingTools/Aegisub / combine_lines

Function combine_lines

src/command/edit.cpp:756–770  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

754};
755
756static void combine_lines(agi::Context *c, void (*combiner)(AssDialogue *, AssDialogue *), wxString const& message) {
757 auto sel = c->selectionController->GetSortedSelection();
758
759 AssDialogue *first = sel[0];
760 combiner(first, nullptr);
761 for (size_t i = 1; i < sel.size(); ++i) {
762 combiner(first, sel[i]);
763 first->End = std::max(first->End, sel[i]->End);
764 delete sel[i];
765 }
766
767 c->selectionController->SetSelectionAndActive({first}, first);
768
769 c->ass->Commit(message, AssFile::COMMIT_DIAG_ADDREM | AssFile::COMMIT_DIAG_FULL);
770}
771
772static void combine_karaoke(AssDialogue *first, AssDialogue *second) {
773 if (second)

Callers 1

operator()Function · 0.85

Calls 4

GetSortedSelectionMethod · 0.80
SetSelectionAndActiveMethod · 0.80
sizeMethod · 0.45
CommitMethod · 0.45

Tested by

no test coverage detected