]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetLayout.cpp
Change string
[lyx.git] / src / insets / InsetLayout.cpp
index 1de4b1cbe29b2a9ad24671c954754a3530fd3ab0..900881764999652e943c0921b78d7da58145bfc8 100644 (file)
@@ -29,6 +29,7 @@ namespace lyx {
 
 InsetLayout::InsetLayout() :
        name_(from_ascii("undefined")), labelstring_(from_ascii("UNDEFINED")),
+       decoration_(InsetLayout::Default),
        font_(sane_font), labelfont_(sane_font), bgcolor_(Color_error), 
        multipar_(false), passthru_(false), needprotect_(false),
        freespacing_(false), keepempty_(false), forceltr_(false)
@@ -60,15 +61,15 @@ enum InsetLayoutTags {
 
 
 namespace {
-       InsetDecoration translateDecoration(std::string const & str) 
+       InsetLayout::InsetDecoration translateDecoration(std::string const & str) 
        {
                if (str == "classic")
-                       return Deco_Classic;
+                       return InsetLayout::Classic;
                if (str == "minimalistic")
-                       return Deco_Minimalistic;
+                       return InsetLayout::Minimalistic;
                if (str == "conglomerate")
-                       return Deco_Conglomerate;
-               return Deco_Default;
+                       return InsetLayout::Conglomerate;
+               return InsetLayout::Default;
        }
 }
 
@@ -166,9 +167,10 @@ bool InsetLayout::read(Lexer & lexrc)
                        needprotect_ = lexrc.getBool();
                        break;
                case IL_FONT: {
-                       font = lyxRead(lexrc, inherit_font);
-                       // So: define font before labelfont
-                       labelfont_ = font;
+                       font_ = lyxRead(lexrc, inherit_font);
+                       // If you want to define labelfont, you need to do so after
+                       // font is defined.
+                       labelfont_ = font_;
                        break;
                }
                case IL_BGCOLOR: {