]> git.lyx.org Git - lyx.git/blobdiff - src/Buffer.cpp
fix "make check" with gcc 4.3
[lyx.git] / src / Buffer.cpp
index ec99566dba047b792de12f9193fde2785fb43a9a..32acc6f5a1f2c10cc9ac73e7168f79da8ba7e6be 100644 (file)
@@ -2729,7 +2729,13 @@ void Buffer::bufferErrors(TeXErrors const & terr, ErrorList & errorList) const
 }
 
 
-void Buffer::updateLabels(bool childonly) const
+void Buffer::setBuffersForInsets() const
+{
+       inset().setBuffer(const_cast<Buffer &>(*this)); 
+}
+
+
+void Buffer::updateLabels(UpdateScope scope) const
 {
        // Use the master text class also for child documents
        Buffer const * const master = masterBuffer();
@@ -2739,11 +2745,11 @@ void Buffer::updateLabels(bool childonly) const
        // master comes back we can see which of them were actually seen (i.e.
        // via an InsetInclude). The remaining ones in the set need still be updated.
        static std::set<Buffer const *> bufToUpdate;
-       if (!childonly) {
+       if (scope == UpdateMaster) {
                // If this is a child document start with the master
                if (master != this) {
                        bufToUpdate.insert(this);
-                       master->updateLabels(false);
+                       master->updateLabels();
                        // Do this here in case the master has no gui associated with it. Then, 
                        // the TocModel is not updated and TocModel::toc_ is invalid (bug 5699).
                        if (!master->gui_)
@@ -2763,7 +2769,6 @@ void Buffer::updateLabels(bool childonly) const
 
        // update all caches
        clearReferenceCache();
-       inset().setBuffer(const_cast<Buffer &>(*this));
        updateMacros();
 
        Buffer & cbuf = const_cast<Buffer &>(*this);
@@ -2779,7 +2784,7 @@ void Buffer::updateLabels(bool childonly) const
                return;
 
        cbuf.tocBackend().update();
-       if (!childonly)
+       if (scope == UpdateMaster)
                cbuf.structureChanged();
 }