Refine previous commit: Forgot the break.

Also, if we're "undefined", then we should just continue reading.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38116 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2011-03-29 01:01:24 +00:00
parent 2a39fbb430
commit aff04ce265

View File

@ -184,10 +184,12 @@ bool InsetLayout::read(Lexer & lex, TextClass const & tclass)
// using the Lexer.
case IL_LYXTYPE: {
// make sure that we have the right sort of name.
if (name_.substr(0,5) != from_ascii("Flex:")) {
if (name_ != from_ascii("undefined")
&& name_.substr(0,5) != from_ascii("Flex:")) {
LYXERR0("Flex insets must have names of the form `Flex:<name>'.\n"
"This one has the name `" << to_utf8(name_) << "'\n"
"Ignoring LyXType declaration.");
break;
}
string lt;
lex >> lt;