rgheck wrote:
* Dissolving a branch inset in the child works.
Restoring via Ctrl-Z leads to a *crash*: The LyX window dissapears
and the
console shows the output:
The cause of this crash is similar. It's another
updateLabels/updateMacros problem. I've got a fix for it in trunk,
but not yet in branch.
Try the attached.
Jurgen, this seems to fix that crash in branch. You can put it in if you
like. Already in trunk.
rh
Index: src/buffer_funcs.cpp
===================================================================
--- src/buffer_funcs.cpp (revision 28753)
+++ src/buffer_funcs.cpp (working copy)
@@ -479,6 +479,8 @@
// the contents of the paragraphs.
void updateLabels(Buffer const & buf, bool childonly)
{
+ // Do this immediately, before something causes a crash.
+ buf.inset().setBuffer(const_cast<Buffer &>(buf));
// Use the master text class also for child documents
Buffer const * const master = buf.masterBuffer();
DocumentClass const & textclass = master->params().documentClass();
@@ -512,7 +514,6 @@
// update all caches
buf.clearReferenceCache();
- buf.inset().setBuffer(const_cast<Buffer &>(buf));
buf.updateMacros();
Buffer & cbuf = const_cast<Buffer &>(buf);