From efc8d44d0960e5dbe6d67721f8a20eb1feb189fa Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Thu, 3 Sep 2020 12:55:06 +0200 Subject: [PATCH] Fixup 2e784b2f: consider default layout too. And simplify the test at the same time. --- src/Text.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Text.cpp b/src/Text.cpp index e03c2cb57c..59bfbefea9 100644 --- a/src/Text.cpp +++ b/src/Text.cpp @@ -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(),