From 6e974a3d42b1e14daf2cdaac65d33aad4876063a Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Fri, 7 Sep 2007 09:55:57 +0000 Subject: [PATCH] Fix bug 4212 * Text2.cpp (deleteEmptyParagraphMechanism): * paragraph_func.cpp (breakParagraph): make sure that the start of appendix marker is not lost when deleting or breaking a paragraph git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20121 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/Text2.cpp | 4 ++++ src/paragraph_funcs.cpp | 3 +++ 2 files changed, 7 insertions(+) diff --git a/src/Text2.cpp b/src/Text2.cpp index 4c47d0811f..d3025d1845 100644 --- a/src/Text2.cpp +++ b/src/Text2.cpp @@ -813,7 +813,11 @@ bool Text::deleteEmptyParagraphMechanism(Cursor & cur, max(old.pit() - 1, pit_type(0)), min(old.pit() + 1, old.lastpit())); ParagraphList & plist = old.text()->paragraphs(); + bool const soa = oldpar.params().startOfAppendix(); plist.erase(boost::next(plist.begin(), old.pit())); + // do not lose start of appendix marker (bug 4212) + if (soa) + boost::next(plist.begin(), old.pit())->params().startOfAppendix(true); // see #warning (FIXME?) above if (cur.depth() >= old.depth()) { diff --git a/src/paragraph_funcs.cpp b/src/paragraph_funcs.cpp index f5dba1d830..ff4812cfce 100644 --- a/src/paragraph_funcs.cpp +++ b/src/paragraph_funcs.cpp @@ -134,7 +134,10 @@ void breakParagraph(BufferParams const & bparams, } if (!isempty) { + bool const soa = par.params().startOfAppendix(); par.params().clear(); + // do not lose start of appendix marker (bug 4212) + par.params().startOfAppendix(soa); par.layout(bparams.getTextClass().defaultLayout()); } -- 2.39.2