]> git.lyx.org Git - features.git/commitdiff
Fix generation of invalid LyX files
authorGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Wed, 1 Nov 2006 09:38:54 +0000 (09:38 +0000)
committerGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Wed, 1 Nov 2006 09:38:54 +0000 (09:38 +0000)
* src/lyxfont.C
(LyXFont::lyxWriteChanges): Don't change color "inherit" to
"default", since that cannot be read in.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15654 a592a061-630c-0410-9148-cb99ea01b6c8

src/lyxfont.C

index 16d1558b73924aba24b98510ce85be1c6be24e48..af6cc0bf7a056b40f31ab98825c44ddcf3270037 100644 (file)
@@ -724,14 +724,8 @@ void LyXFont::lyxWriteChanges(LyXFont const & orgfont,
        if (orgfont.noun() != noun()) {
                os << "\\noun " << LyXMiscNames[noun()] << "\n";
        }
-       if (orgfont.color() != color()) {
-               // To make us file compatible with older
-               // lyx versions we emit "default" instead
-               // of "inherit"
-               string col_str(lcolor.getLyXName(color()));
-               if (col_str == "inherit") col_str = "default";
-               os << "\\color " << col_str << "\n";
-       }
+       if (orgfont.color() != color())
+               os << "\\color " << lcolor.getLyXName(color()) << '\n';
        if (orgfont.language() != language() &&
            language() != latex_language) {
                if (language())