]> git.lyx.org Git - lyx.git/blobdiff - src/buffer_funcs.cpp
* GuiToolbar.cpp:
[lyx.git] / src / buffer_funcs.cpp
index 80992f59e253d675670d1b2f6f488d802ad1a742..0bf934c63c6f9fde0abb25c5ebd0af5c167b3482 100644 (file)
@@ -467,6 +467,7 @@ void updateLabels(Buffer const & buf, ParIterator & parit)
                InsetList::const_iterator end = parit->insetList().end();
                for (; iit != end; ++iit) {
                        parit.pos() = iit->pos;
+                       iit->inset->setBuffer(const_cast<Buffer &>(buf));
                        iit->inset->updateLabels(parit);
                }
        }
@@ -509,6 +510,10 @@ void updateLabels(Buffer const & buf, bool childonly)
        ParIterator parit = par_iterator_begin(buf.inset());
        updateLabels(buf, parit);
 
+       if (master != &buf)
+               // TocBackend update will be done later.
+               return;
+
        cbuf.tocBackend().update();
        if (!childonly)
                cbuf.structureChanged();