[LyX/master] Fixup 2e784b2f: consider default layout too.
Jean-Marc Lasgouttes
lasgouttes at lyx.org
Thu Sep 3 10:30:11 UTC 2020
commit efc8d44d0960e5dbe6d67721f8a20eb1feb189fa
Author: Jean-Marc Lasgouttes <lasgouttes at lyx.org>
Date: Thu Sep 3 12:55:06 2020 +0200
Fixup 2e784b2f: consider default layout too.
And simplify the test at the same time.
---
src/Text.cpp | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/Text.cpp b/src/Text.cpp
index e03c2cb..59bfbef 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(),
More information about the lyx-cvs
mailing list