diff --git a/src/Buffer.cpp b/src/Buffer.cpp index d4a519004f..e827bc9780 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -1417,9 +1417,7 @@ void Buffer::writeLyXHTMLSource(odocstream & os, { LaTeXFeatures features(*this, params(), runparams); validate(features); - // We are going to use some of this stuff ourselves, - // so make sure it is up to date. - updateLabels(); + updateLabels(UpdateMaster, true); d->texrow.reset(); @@ -3442,7 +3440,7 @@ void Buffer::setBuffersForInsets() const } -void Buffer::updateLabels(bool out, UpdateScope scope) const +void Buffer::updateLabels(UpdateScope scope, bool out) const { // Use the master text class also for child documents Buffer const * const master = masterBuffer(); @@ -3456,7 +3454,7 @@ void Buffer::updateLabels(bool out, UpdateScope scope) const // If this is a child document start with the master if (master != this) { bufToUpdate.insert(this); - master->updateLabels(out); + master->updateLabels(UpdateMaster, out); // 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_) diff --git a/src/Buffer.h b/src/Buffer.h index c941f06465..05050fe7af 100644 --- a/src/Buffer.h +++ b/src/Buffer.h @@ -525,10 +525,16 @@ public: // FIXME This really shouldn't be needed, but at the moment it's not // clear how to do it just for the individual pieces we need. void setBuffersForInsets() const; - /// - void updateLabels(bool output = false, UpdateScope = UpdateMaster) const; - /// - void updateLabels(ParIterator & parit, bool output = false) const; + /// Updates screen labels and some other information associated with + /// insets and paragraphs. Actually, it's more like a general "recurse + /// through the Buffer" routine, that visits all the insets and paragraphs. + void updateLabels() const { updateLabels(UpdateMaster, false); } + /// \param scope: whether to start with the master document or just + /// do this one. + /// \param output: whether we are preparing for output. + void updateLabels(UpdateScope scope, bool output) const; + /// + void updateLabels(ParIterator & parit, bool output) const; /// Spellcheck starting from \p from. /// \p from initial position, will then points to the next misspelled diff --git a/src/insets/InsetInclude.cpp b/src/insets/InsetInclude.cpp index 780554db3f..021dd4c730 100644 --- a/src/insets/InsetInclude.cpp +++ b/src/insets/InsetInclude.cpp @@ -1025,7 +1025,7 @@ void InsetInclude::updateLabels(ParIterator const & it, bool out) { Buffer const * const childbuffer = getChildBuffer(); if (childbuffer) { - childbuffer->updateLabels(out, Buffer::UpdateChildOnly); + childbuffer->updateLabels(Buffer::UpdateChildOnly, out); return; } if (!isListings(params()))