Avoid pointless 'undefined flex inset' errors

When switching class, it does not make sense to flag flex insets that
are undefined if they were already undefined before.

Part of bug #12163.
This commit is contained in:
Jean-Marc Lasgouttes 2021-03-02 09:12:47 +01:00
parent fde432493d
commit 009efa195b

View File

@ -853,7 +853,10 @@ void switchBetweenClasses(DocumentClassConstPtr oldone,
docstring const & n = newone->insetLayout(layoutName).name();
bool const is_undefined = n.empty() ||
n == DocumentClass::plainInsetLayout().name();
if (!is_undefined)
docstring const & oldn = oldone->insetLayout(layoutName).name();
bool const was_undefined = oldn.empty() ||
oldn == DocumentClass::plainInsetLayout().name();
if (!is_undefined || was_undefined)
continue;
// The flex inset is undefined in newtc