[EMAIL PROTECTED] wrote:
Author: younes
Date: Wed Aug 6 18:08:50 2008
New Revision: 26081
URL: http://www.lyx.org/trac/changeset/26081
Log:
Fix http://bugzilla.lyx.org/show_bug.cgi?id=5127
A call to updateLabels() was necessary (and safer) in all cases.
Can you explain where along the way this sets the new InsetTOC's
buffer()? I can't find it in the code....
rh
Modified:
lyx-devel/trunk/src/Undo.cpp
Modified: lyx-devel/trunk/src/Undo.cpp
URL: http://www.lyx.org/trac/file/lyx-devel/trunk/src/Undo.cpp?rev=26081
==============================================================================
--- lyx-devel/trunk/src/Undo.cpp (original)
+++ lyx-devel/trunk/src/Undo.cpp Wed Aug 6 18:08:50 2008
@@ -340,7 +340,6 @@
// 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 @@
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 @@
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;
}
_______________________________________________
Cvslog mailing list
[EMAIL PROTECTED]
http://www.lyx.org/mailman/listinfo/cvslog