]> git.lyx.org Git - lyx.git/blobdiff - src/Layout.cpp
GuiBox.cpp: fix this issue: horizontal box alignment is only possible without inner...
[lyx.git] / src / Layout.cpp
index e3fea105e410ac2d3f2210d9eaa5d94d9729b451..6dfc0f5dcf7c1838c3a81f1ae73f77dad23323bc 100644 (file)
@@ -560,6 +560,12 @@ bool Layout::read(Lexer & lex, TextClass const & tclass)
                }
        }
        lex.popTable();
+       // make sure we only have inpreamble = true for commands
+       if (inpreamble && latextype != LATEX_COMMAND) {
+               LYXERR0("InPreamble not permitted except with Command-type layouts.");
+               LYXERR0("Layout name: " << name());
+               inpreamble = false;
+       }
 
        return !error;
 }