+ branch_in_master = false;
+ }
+ bool const activate = (cmd.action() == LFUN_BRANCH_ACTIVATE);
+ if (our_branch->isSelected() != activate) {
+ // FIXME If the branch is in the master document, we cannot
+ // call recordUndo..., becuase the master may be hidden, and
+ // the code presently assumes that hidden documents can never
+ // be dirty. See GuiView::closeBufferAll(), for example.
+ if (!branch_in_master)
+ buffer().undo().recordUndoFullDocument(cur);
+ our_branch->setSelected(activate);
+ cur.forceBufferUpdate();