mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-03 08:28:25 +00:00
Revert "Tentative fix to #8159: Undo doesn't restore environment depth correctly"
This reverts commit e3854bb59b
.
This commit is contained in:
parent
9ccf50c906
commit
c22334eb3b
10
src/Undo.cpp
10
src/Undo.cpp
@ -23,7 +23,6 @@
|
|||||||
#include "DocIterator.h"
|
#include "DocIterator.h"
|
||||||
#include "Paragraph.h"
|
#include "Paragraph.h"
|
||||||
#include "ParagraphList.h"
|
#include "ParagraphList.h"
|
||||||
#include "ParagraphParameters.h"
|
|
||||||
#include "Text.h"
|
#include "Text.h"
|
||||||
|
|
||||||
#include "mathed/MathSupport.h"
|
#include "mathed/MathSupport.h"
|
||||||
@ -345,15 +344,6 @@ void Undo::Private::doRecordUndo(UndoKind kind,
|
|||||||
advance(first, first_pit);
|
advance(first, first_pit);
|
||||||
ParagraphList::const_iterator last = plist.begin();
|
ParagraphList::const_iterator last = plist.begin();
|
||||||
advance(last, last_pit + 1);
|
advance(last, last_pit + 1);
|
||||||
// If the paragraphs after the last one have a
|
|
||||||
// non-zero depth and the depth of last paragraph is
|
|
||||||
// decremented, then these paragraphs may be affected
|
|
||||||
// (ticket #8159). We guard against that by saving
|
|
||||||
// these extra paragraphs.
|
|
||||||
while (last != plist.end() && last->params().depth() > 0) {
|
|
||||||
++last;
|
|
||||||
--undo.end;
|
|
||||||
}
|
|
||||||
undo.pars = new ParagraphList(first, last);
|
undo.pars = new ParagraphList(first, last);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user