From: Jean-Marc Lasgouttes Date: Fri, 15 Feb 2019 16:17:56 +0000 (+0100) Subject: Do a round of DEPM after changing layout X-Git-Tag: lyx-2.4.0dev-acb2ca7b~2570 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=26ad2c6a67239b328266b355132664666a8af728;p=features.git Do a round of DEPM after changing layout --- diff --git a/src/Text2.cpp b/src/Text2.cpp index b917dba212..f1decc56f4 100644 --- a/src/Text2.cpp +++ b/src/Text2.cpp @@ -186,6 +186,8 @@ void Text::setLayout(pit_type start, pit_type end, if (lyxlayout.margintype == MARGIN_MANUAL) par.setLabelWidthString(par.expandLabel(lyxlayout, bp)); } + + deleteEmptyParagraphMechanism(start, end - 1, bp.track_changes); } @@ -198,6 +200,7 @@ void Text::setLayout(Cursor & cur, docstring const & layout) pit_type end = cur.selEnd().pit() + 1; cur.recordUndoSelection(); setLayout(start, end, layout); + cur.fixIfBroken(); cur.setCurrentFont(); cur.forceBufferUpdate(); }