commit 26ad2c6a67239b328266b355132664666a8af728
Author: Jean-Marc Lasgouttes <[email protected]>
Date: Fri Feb 15 17:17:56 2019 +0100
Do a round of DEPM after changing layout
---
src/Text2.cpp | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/Text2.cpp b/src/Text2.cpp
index b917dba..f1decc5 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();
}