void InsetBranch::doDispatch(Cursor & cur, FuncRequest & cmd)
{
- switch (cmd.action) {
+ switch (cmd.action()) {
case LFUN_INSET_MODIFY: {
InsetBranchParams params;
InsetBranch::string2params(to_utf8(cmd.argument()), params);
params_.branch = params.branch;
+ // what we really want here is a TOC update, but that means
+ // a full buffer update
+ cur.forceBufferUpdate();
break;
}
case LFUN_BRANCH_ACTIVATE:
if (!our_branch)
break;
}
- our_branch->setSelected(cmd.action == LFUN_BRANCH_ACTIVATE);
+ our_branch->setSelected(cmd.action() == LFUN_BRANCH_ACTIVATE);
break;
}
case LFUN_INSET_TOGGLE:
bool InsetBranch::getStatus(Cursor & cur, FuncRequest const & cmd,
FuncStatus & flag) const
{
- switch (cmd.action) {
+ switch (cmd.action()) {
case LFUN_INSET_MODIFY:
flag.setEnabled(true);
break;
Toc & toc = buffer().tocBackend().toc("branch");
docstring const str = params_.branch + ": " + text().getPar(0).asString();
- toc.push_back(TocItem(pit, 0, str));
+ toc.push_back(TocItem(pit, 0, str, toolTipText()));
// Proceed with the rest of the inset.
InsetCollapsable::addToToc(cpit);
}