Delay the Toc update of child documents until we update the master one.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24868 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2008-05-20 12:58:54 +00:00
parent c1de549560
commit 641ae02e37
2 changed files with 5 additions and 0 deletions

View File

@ -509,6 +509,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();

View File

@ -909,6 +909,7 @@ void InsetInclude::addToToc(DocIterator const & cpit)
toc.push_back(TocItem(cpit, 0, str));
TocList & toclist = backend.tocs();
childbuffer->tocBackend().update();
TocList const & childtoclist = childbuffer->tocBackend().tocs();
TocList::const_iterator it = childtoclist.begin();
TocList::const_iterator const end = childtoclist.end();