From 0f9e4d7c2d96ab08d249ad77c66b763162f740df Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Wed, 6 Aug 2008 16:08:50 +0000 Subject: [PATCH] Fix http://bugzilla.lyx.org/show_bug.cgi?id=5127 A call to updateLabels() was necessary (and safer) in all cases. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26081 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/Undo.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Undo.cpp b/src/Undo.cpp index 06bd16ccc8..4e2ac02c88 100644 --- a/src/Undo.cpp +++ b/src/Undo.cpp @@ -340,7 +340,6 @@ bool Undo::Private::textUndoOrRedo(DocIterator & cur, bool isUndoOperation) // This does the actual undo/redo. //LYXERR0("undo, performing: " << undo); - bool labelsUpdateNeeded = false; DocIterator dit = undo.cell.asDocIterator(&buffer_.inset()); if (undo.isFullBuffer) { LASSERT(undo.pars, /**/); @@ -387,7 +386,6 @@ bool Undo::Private::textUndoOrRedo(DocIterator & cur, bool isUndoOperation) plist.insert(first, undo.pars->begin(), undo.pars->end()); delete undo.pars; undo.pars = 0; - labelsUpdateNeeded = true; } LASSERT(undo.pars == 0, /**/); LASSERT(undo.array == 0, /**/); @@ -395,9 +393,8 @@ bool Undo::Private::textUndoOrRedo(DocIterator & cur, bool isUndoOperation) cur = undo.cursor.asDocIterator(&buffer_.inset()); // Now that we're done with undo, we pop it off the stack. stack.pop(); - - if (labelsUpdateNeeded) - updateLabels(buffer_); + // Addapt the new material to current buffer. + updateLabels(buffer_); undo_finished_ = true; return true; } -- 2.39.5