mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-27 03:36:39 +00:00
* Outline(): fix undo/redo for promote/demote
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23379 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
6b10b7fd33
commit
6bf2052227
@ -320,8 +320,9 @@ static void outline(OutlineOp mode, Cursor & cur)
|
||||
pars.erase(start, finish);
|
||||
return;
|
||||
}
|
||||
case OutlineIn:
|
||||
buf.undo().recordUndo(cur);
|
||||
case OutlineIn: {
|
||||
pit_type const len = distance(start, finish);
|
||||
buf.undo().recordUndo(cur, ATOMIC_UNDO, pit, pit + len - 1);
|
||||
for (; start != finish; ++start) {
|
||||
toclevel = start->layout()->toclevel;
|
||||
if (toclevel == Layout::NOT_IN_TOC)
|
||||
@ -336,9 +337,10 @@ static void outline(OutlineOp mode, Cursor & cur)
|
||||
}
|
||||
}
|
||||
return;
|
||||
|
||||
case OutlineOut:
|
||||
buf.undo().recordUndo(cur);
|
||||
}
|
||||
case OutlineOut: {
|
||||
pit_type const len = distance(start, finish);
|
||||
buf.undo().recordUndo(cur, ATOMIC_UNDO, pit, pit + len - 1);
|
||||
for (; start != finish; ++start) {
|
||||
toclevel = start->layout()->toclevel;
|
||||
if (toclevel == Layout::NOT_IN_TOC)
|
||||
@ -354,6 +356,7 @@ static void outline(OutlineOp mode, Cursor & cur)
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user