From b954c5ddf849f2899907a4e36529d69ed358c773 Mon Sep 17 00:00:00 2001 From: Martin Vermeer Date: Wed, 2 Nov 2005 13:54:33 +0000 Subject: [PATCH] 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 --- src/insets/ChangeLog | 6 ++++++ src/insets/insetbranch.C | 13 +++++++++---- src/insets/insetcharstyle.C | 2 +- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index 082b383ad2..3c12c4ede2 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,3 +1,9 @@ +2005-11-02 Martin Vermeer + + * 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 * insetbranch.C (isBranchSelected): take a buffer as argument. diff --git a/src/insets/insetbranch.C b/src/insets/insetbranch.C index 9a9fe58ed7..a18bf41d4f 100644 --- a/src/insets/insetbranch.C +++ b/src/insets/insetbranch.C @@ -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); } diff --git a/src/insets/insetcharstyle.C b/src/insets/insetcharstyle.C index 1963e0aa6e..6b2a785fa4 100644 --- a/src/insets/insetcharstyle.C +++ b/src/insets/insetcharstyle.C @@ -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); } -- 2.39.2