From 4f09c28bdd2495c9fc3642abfd4f61254377dd17 Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Fri, 7 Jun 2013 12:15:18 -0400 Subject: [PATCH] Fix bug #8727: Text::breakParagraph() was always setting the default layout, even if the paragraph in question requires plain layout. (cherry picked from commit f8f1232465144016b5058d5aa60aff0fa5419bdc) --- src/Text.cpp | 7 +++++-- status.20x | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Text.cpp b/src/Text.cpp index ea3db714ec..1fefb18124 100644 --- a/src/Text.cpp +++ b/src/Text.cpp @@ -695,8 +695,11 @@ void Text::breakParagraph(Cursor & cur, bool inverse_logic) if (cur.lastpos() == 0 && !cpar.allowEmpty()) { if (changeDepthAllowed(cur, DEC_DEPTH)) changeDepth(cur, DEC_DEPTH); - else - setLayout(cur, tclass.defaultLayoutName()); + else { + docstring const & lay = cur.paragraph().usePlainLayout() + ? tclass.plainLayoutName() : tclass.defaultLayoutName(); + setLayout(cur, lay); + } return; } diff --git a/status.20x b/status.20x index 5f09acc3fd..97165ed7ec 100644 --- a/status.20x +++ b/status.20x @@ -89,6 +89,8 @@ What's new - Disable invalid actions in empty outliner that could trigger a crash (bug 8885). + +- Fix warning when setting layout box when Plain Layout is used (bug 8727). - Fix bug where searching for next change may leave an empty paragraph where cursor was (bug 3199). -- 2.39.5