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
This commit is contained in:
Jean-Marc Lasgouttes 2007-09-07 09:55:57 +00:00
parent fc2f8c8e4f
commit 6e974a3d42
2 changed files with 7 additions and 0 deletions

View File

@ -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()) {

View File

@ -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());
}