mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-13 17:20:55 +00:00
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/branches/BRANCH_1_5_X@20125 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
80af79b747
commit
fd17266d65
@ -1186,7 +1186,11 @@ bool Text::deleteEmptyParagraphMechanism(Cursor & cur,
|
|||||||
max(old.pit() - 1, pit_type(0)),
|
max(old.pit() - 1, pit_type(0)),
|
||||||
min(old.pit() + 1, old.lastpit()));
|
min(old.pit() + 1, old.lastpit()));
|
||||||
ParagraphList & plist = old.text()->paragraphs();
|
ParagraphList & plist = old.text()->paragraphs();
|
||||||
|
bool const soa = oldpar.params().startOfAppendix();
|
||||||
plist.erase(boost::next(plist.begin(), old.pit()));
|
plist.erase(boost::next(plist.begin(), old.pit()));
|
||||||
|
// do not lose start of appendix marker (bug 4212)
|
||||||
|
if (soa)
|
||||||
|
plist[old.pit()].params().startOfAppendix(true);
|
||||||
|
|
||||||
// see #warning above
|
// see #warning above
|
||||||
if (cur.depth() >= old.depth()) {
|
if (cur.depth() >= old.depth()) {
|
||||||
|
@ -134,7 +134,10 @@ void breakParagraph(BufferParams const & bparams,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!isempty) {
|
if (!isempty) {
|
||||||
|
bool const soa = par.params().startOfAppendix();
|
||||||
par.params().clear();
|
par.params().clear();
|
||||||
|
// do not lose start of appendix marker (bug 4212)
|
||||||
|
par.params().startOfAppendix(soa);
|
||||||
par.layout(bparams.getTextClass().defaultLayout());
|
par.layout(bparams.getTextClass().defaultLayout());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -121,6 +121,9 @@ What's new
|
|||||||
|
|
||||||
- Fix deletion of pars with leading spaces (bug 3600).
|
- Fix deletion of pars with leading spaces (bug 3600).
|
||||||
|
|
||||||
|
- Fix loss of start-of-appendix information when creating/deleting an
|
||||||
|
empty paragraph (bug 4212).
|
||||||
|
|
||||||
- Fix that Revert and Save As were treated as "file is externally modified"
|
- Fix that Revert and Save As were treated as "file is externally modified"
|
||||||
(bug 4193)
|
(bug 4193)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user