X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fbufferparams.C;h=0f119fe5731b17ae4706c195b7e08afb92146062;hb=1cad117882dc393b2d55174c6f2ab67920a54ce1;hp=2f3d5147cbb7ff2e403816122ffaacfc4f2a0fe9;hpb=83ceb3c57b371c71c1706ecc371e624162f5ccef;p=features.git diff --git a/src/bufferparams.C b/src/bufferparams.C index 2f3d5147cb..0f119fe573 100644 --- a/src/bufferparams.C +++ b/src/bufferparams.C @@ -333,20 +333,22 @@ string const BufferParams::readToken(LyXLex & lex, string const & token) string const tok = lex.getString(); if (tok == "\\end_branch") break; + Branch * branch_ptr = branchlist().find(branch); if (tok == "\\selected") { lex.nextToken(); - branchlist().setSelected(branch, lex.getInteger()); + if (branch_ptr) + branch_ptr->setSelected(lex.getInteger()); } // not yet operational if (tok == "\\color") { lex.nextToken(); string color = lex.getString(); - branchlist().setColor(branch, color); + if (branch_ptr) + branch_ptr->setColor(color); // Update also the LColor table: if (color == "none") color = lcolor.getX11Name(LColor::background); - lcolor.fill(static_cast(lcolor.size()), - branch, color); + lcolor.setColor(lcolor.getFromLyXName(branch), color); } } } else if (token == "\\author") {