- DocIterator pit = cpit;
- pit.push_back(CursorSlice(const_cast<InsetBranch &>(*this)));
-
- docstring str;
- text().forOutliner(str, TOC_ENTRY_LENGTH);
- str = params_.branch + ": " + str;
- shared_ptr<Toc> toc = buffer().tocBackend().toc("branch");
- toc->push_back(TocItem(pit, 0, str, output_active));
-
- // Proceed with the rest of the inset.
- bool const doing_output = output_active && isBranchSelected();
- InsetCollapsable::addToToc(cpit, doing_output, utype);
+ setLabel(params_.branch + (params_.inverted ? " (-)" : ""));
+ InsetCollapsible::updateBuffer(it, utype);