]> git.lyx.org Git - lyx.git/blobdiff - src/CutAndPaste.cpp
Kornel's gcc compile fix.
[lyx.git] / src / CutAndPaste.cpp
index 96063774977460fb2b336ed752522c14b08da4db..944119f96554305f3e6408843db76e0508ed29d5 100644 (file)
@@ -608,7 +608,10 @@ void switchBetweenClasses(DocumentClass const * const oldone,
                if (it->lyxCode() != FLEX_CODE)
                        // FIXME: Should we verify all InsetCollapsable?
                        continue;
-               if (!it->undefined())
+               docstring const & n = newone->insetLayout(it->name()).name();
+               bool const is_undefined = n.empty() ||
+                       n == DocumentClass::plainInsetLayout().name();
+               if (!is_undefined)
                        continue;
                // The flex inset is undefined in newtc
                docstring const s = bformat(_(