]> git.lyx.org Git - features.git/commitdiff
Do a round of DEPM after changing layout
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 15 Feb 2019 16:17:56 +0000 (17:17 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 18 Jun 2020 12:39:58 +0000 (14:39 +0200)
src/Text2.cpp

index b917dba2122d2c02f9d1b32129f45fc08daffb64..f1decc56f4f99b720e49043eaca7a2e25ab0b904 100644 (file)
@@ -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();
 }