]> git.lyx.org Git - features.git/commitdiff
Partial fix bug 2092: branches not propagated to child documents
authorMartin Vermeer <martin.vermeer@hut.fi>
Wed, 2 Nov 2005 13:54:33 +0000 (13:54 +0000)
committerMartin Vermeer <martin.vermeer@hut.fi>
Wed, 2 Nov 2005 13:54:33 +0000 (13:54 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10584 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/ChangeLog
src/insets/insetbranch.C
src/insets/insetcharstyle.C

index 082b383ad23c3b4b3a193dbb543a730d256d1b87..3c12c4ede218821db5c49bb0d52276b5aa708a15 100644 (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.
index 9a9fe58ed742128eb37195c9e5e56a7612db3bb9..a18bf41d4f8693cc3b5aeefbd99dc70c628cc570 100644 (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);
 }
 
index 1963e0aa6eef34f1707f1234bc964c0e4c4c3c35..6b2a785fa4cae51a1c6d9b84097ff60803abaf9d 100644 (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);
 }