Do not invalidate cache unless we find some BibTeX insets. Part of

#6846.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35102 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2010-08-09 16:18:57 +00:00
parent b01fcee92d
commit 4509607bf6

View File

@ -1711,19 +1711,23 @@ void Buffer::updateBibfilesCache(UpdateScope scope) const
d->bibfiles_cache_.insert(d->bibfiles_cache_.end(),
bibfiles.begin(),
bibfiles.end());
// the bibinfo cache is now invalid
d->bibinfo_cache_valid_ = false;
} else if (it->lyxCode() == INCLUDE_CODE) {
InsetInclude & inset =
static_cast<InsetInclude &>(*it);
inset.updateBibfilesCache();
support::FileNameList const & bibfiles =
inset.getBibfilesCache();
d->bibfiles_cache_.insert(d->bibfiles_cache_.end(),
bibfiles.begin(),
bibfiles.end());
if (!bibfiles.empty()) {
d->bibfiles_cache_.insert(d->bibfiles_cache_.end(),
bibfiles.begin(),
bibfiles.end());
// the bibinfo cache is now invalid
d->bibinfo_cache_valid_ = false;
}
}
}
// the bibinfo cache is now invalid
d->bibinfo_cache_valid_ = false;
}