mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-03 08:28:25 +00:00
keep a cast for later
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29551 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
cd62043a1b
commit
36a811cba2
@ -147,12 +147,12 @@ void InsetBranch::doDispatch(Cursor & cur, FuncRequest & cmd)
|
||||
case LFUN_BRANCH_ACTIVATE:
|
||||
case LFUN_BRANCH_DEACTIVATE: {
|
||||
// FIXME: I do not like this cast, but have no other idea...
|
||||
Buffer * realbuffer = const_cast<Buffer *>(buffer().masterBuffer());
|
||||
BranchList & branchlist = realbuffer->params().branchlist();
|
||||
Branch * ourBranch = branchlist.find(params_.branch);
|
||||
if (!ourBranch)
|
||||
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;
|
||||
ourBranch->setSelected(cmd.action == LFUN_BRANCH_ACTIVATE);
|
||||
our_branch->setSelected(cmd.action == LFUN_BRANCH_ACTIVATE);
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user