Bug fix in branches (was earlier fixed wrongly)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7803 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Martin Vermeer 2003-09-22 07:46:27 +00:00
parent 47428517e7
commit 100e323d04
4 changed files with 12 additions and 4 deletions

View File

@ -1,3 +1,7 @@
2003-09-22 Martin Vermeer <martin.vermeer@hut.fi>
* factory.C: bug fix in branches
2003-09-22 Lars Gullik Bjønnes <larsbj@gullik.net>
* lyxfunc.C (processKeySym): adjust

View File

@ -370,7 +370,7 @@ InsetOld * readInset(LyXLex & lex, Buffer const & buf)
|| tmptok == "Greyedout") {
inset = new InsetNote(buf.params(), tmptok);
} else if (tmptok == "Branch") {
inset = new InsetBranch(buf.params(), tmptok);
inset = new InsetBranch(buf.params(), string());
} else if (tmptok == "Include") {
InsetCommandParams p("Include");
inset = new InsetInclude(p);

View File

@ -1,3 +1,7 @@
2003-09-22 Martin Vermeer <martin.vermeer@hut.fi>
* insetbranch.C: bug fix in branches
2003-09-22 Martin Vermeer <martin.vermeer@hut.fi>
* insetnote.C: small clean-up.

View File

@ -32,6 +32,7 @@ using std::ostringstream;
void InsetBranch::init()
{
setInsetName("Branch");
setButtonLabel();
}
@ -98,10 +99,9 @@ void InsetBranch::setButtonLabel()
setLabel("Branch: " + params_.branch);
font.setColor(LColor::foreground);
string const color = params_.branchlist.getColor(params_.branch);
if (!color.empty()) {
if (!params_.branch.empty())
setBackgroundColor(lcolor.getFromLyXName(params_.branch));
} else
else
setBackgroundColor(LColor::background);
setLabelFont(font);
}