Fixup 2e784b2f: consider default layout too.

And simplify the test at the same time.
This commit is contained in:
Jean-Marc Lasgouttes 2020-09-03 12:55:06 +02:00
parent 5b43b84e43
commit efc8d44d09

View File

@ -1833,7 +1833,8 @@ bool Text::dissolveInset(Cursor & cur)
*/
DocumentClass const & tclass = cur.buffer()->params().documentClass();
if (inset_it.lastpos() == 1
&& plist[0].layout().name() != tclass.plainLayoutName())
&& !tclass.isPlainLayout(plist[0].layout())
&& !tclass.isDefaultLayout(plist[0].layout()))
cur.paragraph().makeSameLayout(plist[0]);
pasteParagraphList(cur, plist, b.params().documentClassPtr(),