mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-23 08:44:01 +00:00
Cosmetic repairs to my updateLabels() changes, thanks to Andre's
comments. Added comments per Pavel's suggestion. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32453 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
28ce123a18
commit
69666056ca
@ -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_)
|
||||
|
14
src/Buffer.h
14
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
|
||||
|
@ -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()))
|
||||
|
Loading…
x
Reference in New Issue
Block a user