Fix status check of branch (de)activation from the child, when master

has no info about that branch.

Context menu still does not work.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30457 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Pavel Sanda 2009-07-11 00:10:18 +00:00
parent 75659b3db4
commit 29ff62face

View File

@ -205,8 +205,13 @@ bool InsetBranch::isBranchSelected() const
Buffer const & realbuffer = *buffer().masterBuffer();
BranchList const & branchlist = realbuffer.params().branchlist();
Branch const * ourBranch = branchlist.find(params_.branch);
if (!ourBranch)
return false;
if (!ourBranch) {
// this branch is defined in child only
ourBranch = buffer().params().branchlist().find(params_.branch);
if (!ourBranch)
return false;
}
return ourBranch->isSelected();
}