if (inchild && master_selected != child_selected)
symb += (child_selected ? tick : cross);
- docstring inv_symb = from_ascii(params_.inverted ? "~" : "");
+ docstring inv_symb = from_ascii(params_.inverted ? "~" : "");
if (decoration() == InsetDecoration::MINIMALISTIC)
return symb + inv_symb + params_.branch;
{
if (params_.branch.empty())
return Inset::backgroundColor(pi);
+ string const branch_id = (buffer().masterParams().branchlist().find(params_.branch))
+ ? convert<string>(buffer().masterParams().branchlist().id())
+ : convert<string>(buffer().params().branchlist().id());
// FIXME UNICODE
- string const branchcol = "branch" + convert<string>(buffer().params().branchlist().id())
- + to_utf8(params_.branch);
+ string const branchcol = "branch" + branch_id + to_utf8(params_.branch);
ColorCode c = lcolor.getFromLyXName(branchcol);
if (c == Color_none)
c = Color_error;
case LFUN_BRANCH_ADD:
lyx::dispatch(FuncRequest(LFUN_BRANCH_ADD, params_.branch));
break;
+ case LFUN_BRANCH_SYNC_ALL:
+ lyx::dispatch(FuncRequest(LFUN_INSET_FORALL, "Branch:" + params_.branch + " inset-toggle assign"));
+ break;
case LFUN_INSET_TOGGLE:
if (cmd.argument() == "assign")
- setStatus(cur, isBranchSelected() ? Open : Collapsed);
+ setStatus(cur, (isBranchSelected(true) != params_.inverted) ? Open : Collapsed);
else
InsetCollapsible::doDispatch(cur, cmd);
break;
flag.setEnabled(buffer().parent() && isBranchSelected());
break;
+ case LFUN_BRANCH_SYNC_ALL:
+ flag.setEnabled(known_branch);
+ break;
+
case LFUN_INSET_TOGGLE:
if (cmd.argument() == "assign")
flag.setEnabled(true);
void InsetBranch::latex(otexstream & os, OutputParams const & runparams) const
{
- if (producesOutput()) {
+ if (producesOutput() || runparams.find_with_non_output()) {
OutputParams rp = runparams;
rp.inbranch = true;
InsetText::latex(os, rp);
int InsetBranch::plaintext(odocstringstream & os,
OutputParams const & runparams, size_t max_length) const
{
- if (!producesOutput())
+ if (!producesOutput() && !runparams.find_with_non_output())
return 0;
int len = InsetText::plaintext(os, runparams, max_length);