]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetLayout.cpp
Fix logic error that led to bug #8777. I have no idea what I was
[lyx.git] / src / insets / InsetLayout.cpp
index 0dc7914dde7f6db102ba17b9a40dff32191f3d02..aa35f502540ed02e56bd82df9cfb346bb63e29af 100644 (file)
@@ -34,7 +34,7 @@ namespace lyx {
 InsetLayout::InsetLayout() :
        name_(from_ascii("undefined")), lyxtype_(STANDARD),
        labelstring_(from_ascii("UNDEFINED")), contentaslabel_(false),
-       decoration_(DEFAULT), latextype_(NOLATEXTYPE), font_(sane_font), 
+       decoration_(DEFAULT), latextype_(NOLATEXTYPE), font_(inherit_font), 
        labelfont_(sane_font), bgcolor_(Color_error), 
        htmlforcecss_ (false), htmlisblock_(true),
        multipar_(true), custompars_(true), forceplain_(false), 
@@ -336,8 +336,10 @@ bool InsetLayout::read(Lexer & lex, TextClass const & tclass)
                case IL_RESETARGS:
                        bool reset;
                        lex >> reset;
-                       if (reset)
+                       if (reset) {
                                latexargs_.clear();
+                               postcommandargs_.clear();
+                       }
                        break;
                case IL_ARGUMENT:
                        readArgument(lex);
@@ -549,6 +551,9 @@ void InsetLayout::readArgument(Lexer & lex)
                        arg.rdelim = lex.getDocString();
                        arg.rdelim = support::subst(arg.rdelim,
                                                    from_ascii("<br/>"), from_ascii("\n"));
+               } else if (tok == "defaultarg") {
+                       lex.next();
+                       arg.defaultarg = lex.getDocString();
                } else if (tok == "presetarg") {
                        lex.next();
                        arg.presetarg = lex.getDocString();