Partial fix bug 2092: branches not propagated to child documents

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10584 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Martin Vermeer 2005-11-02 13:54:33 +00:00
parent b82859b382
commit b954c5ddf8
3 changed files with 16 additions and 5 deletions

View File

@ -1,3 +1,9 @@
2005-11-02 Martin Vermeer <martin.vermeer@hut.fi>
* insetbranch.C: partial fix bug 2092: branches not
propagated to child docs
* insetcharstyle.C: Also replace LColor::red by LColor::error
2005-10-25 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
* insetbranch.C (isBranchSelected): take a buffer as argument.

View File

@ -95,12 +95,17 @@ void InsetBranch::setButtonLabel()
font.decSize();
string s = _("Branch: ") + params_.branch;
setLabel(isOpen() ? s : getNewLabel(s) );
font.setColor(LColor::foreground);
if (!params_.branch.empty())
setBackgroundColor(lcolor.getFromLyXName(params_.branch));
else
if (!params_.branch.empty()) {
LColor_color c = lcolor.getFromLyXName(params_.branch);
if (c == LColor::none) {
c = LColor::error;
s = _("Undef: ") + s;
}
setBackgroundColor(c);
} else
setBackgroundColor(LColor::background);
setLabel(isOpen() ? s : getNewLabel(s) );
setLabelFont(font);
}

View File

@ -97,7 +97,7 @@ void InsetCharStyle::setUndefined()
params_.latexparam.clear();
params_.font = LyXFont(LyXFont::ALL_INHERIT);
params_.labelfont = LyXFont(LyXFont::ALL_INHERIT);
params_.labelfont.setColor(LColor::red);
params_.labelfont.setColor(LColor::error);
}