mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-09-20 06:49:56 +00:00
* move TOC update behind cur.fixIfBroken() to fix #3851
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18762 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
fd44c4ffdf
commit
b06797a312
@ -164,6 +164,7 @@ bool textUndoOrRedo(BufferView & bv,
|
||||
|
||||
// This does the actual undo/redo.
|
||||
//lyxerr << "undo, performing: " << undo << std::endl;
|
||||
bool labelsUpdateNeeded = false;
|
||||
DocIterator dit = undo.cell.asDocIterator(&buf->inset());
|
||||
if (undo.isFullBuffer) {
|
||||
BOOST_ASSERT(undo.pars);
|
||||
@ -209,7 +210,7 @@ bool textUndoOrRedo(BufferView & bv,
|
||||
plist.insert(first, undo.pars->begin(), undo.pars->end());
|
||||
delete undo.pars;
|
||||
undo.pars = 0;
|
||||
updateLabels(*buf);
|
||||
labelsUpdateNeeded = true;
|
||||
}
|
||||
BOOST_ASSERT(undo.pars == 0);
|
||||
BOOST_ASSERT(undo.array == 0);
|
||||
@ -220,8 +221,10 @@ bool textUndoOrRedo(BufferView & bv,
|
||||
cur.selection() = false;
|
||||
cur.resetAnchor();
|
||||
cur.fixIfBroken();
|
||||
|
||||
if (labelsUpdateNeeded)
|
||||
updateLabels(*buf);
|
||||
finishUndo();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user