X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FCutAndPaste.cpp;h=39b732fea6b2affdec2d3ab6d800c9b1bb010fe3;hb=77185fe83d28a0a1dc48980a9db3c34110e02e31;hp=fb7ad88b5a5fe58eb54e9ceba391211f376cb414;hpb=98e317ef1db05e521affdb17aa8b399bfcb9d9d5;p=lyx.git diff --git a/src/CutAndPaste.cpp b/src/CutAndPaste.cpp index fb7ad88b5a..39b732fea6 100644 --- a/src/CutAndPaste.cpp +++ b/src/CutAndPaste.cpp @@ -667,7 +667,9 @@ void switchBetweenClasses(DocumentClass const * const oldone, if (it->lyxCode() != FLEX_CODE) // FIXME: Should we verify all InsetCollapsable? continue; - docstring const & n = newone->insetLayout(it->name()).name(); + + docstring const layoutName = it->layoutName(); + docstring const & n = newone->insetLayout(layoutName).name(); bool const is_undefined = n.empty() || n == DocumentClass::plainInsetLayout().name(); if (!is_undefined) @@ -679,12 +681,11 @@ void switchBetweenClasses(DocumentClass const * const oldone, docstring s; if (oldname == newname) s = bformat(_("Flex inset %1$s is undefined after " - "reloading `%2$s' layout."), - it->name(), oldname); + "reloading `%2$s' layout."), layoutName, oldname); else s = bformat(_("Flex inset %1$s is undefined because of " "conversion from `%2$s' layout to `%3$s'."), - it->name(), oldname, newname); + layoutName, oldname, newname); // To warn the user that something had to be done. errorlist.push_back(ErrorItem( _("Undefined flex inset"),