Fix setting via context menu.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30458 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Pavel Sanda 2009-07-11 00:11:59 +00:00
parent 29ff62face
commit 4a7bb9541f

View File

@ -150,8 +150,12 @@ void InsetBranch::doDispatch(Cursor & cur, FuncRequest & cmd)
Buffer const * buf = buffer().masterBuffer();
BranchList const & branchlist = buf->params().branchlist();
Branch * our_branch = const_cast<Branch *>(branchlist.find(params_.branch));
if (!our_branch)
break;
if (!our_branch) {
// child only?
our_branch = buffer().params().branchlist().find(params_.branch);
if (!our_branch)
break;
}
our_branch->setSelected(cmd.action == LFUN_BRANCH_ACTIVATE);
break;
}