mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Clear bibfile cache when set of bibliography files change
Part of #9158
This commit is contained in:
parent
7a03fa6f1d
commit
4115d2487f
@ -2492,6 +2492,12 @@ void Buffer::checkIfBibInfoCacheIsValid() const
|
||||
}
|
||||
|
||||
|
||||
void Buffer::clearBibFileCache() const
|
||||
{
|
||||
bibfileCache.clear();
|
||||
}
|
||||
|
||||
|
||||
void Buffer::reloadBibInfoCache(bool const force) const
|
||||
{
|
||||
// use the master's cache
|
||||
@ -2511,7 +2517,7 @@ void Buffer::reloadBibInfoCache(bool const force) const
|
||||
// FIXME Is this sufficient? Or should we also force that
|
||||
// in some other cases? If so, then it is easy enough to
|
||||
// add the following line in some other places.
|
||||
bibfileCache.clear();
|
||||
clearBibFileCache();
|
||||
d->bibinfo_.clear();
|
||||
FileNameList checkedFiles;
|
||||
collectBibKeys(checkedFiles);
|
||||
|
@ -500,6 +500,8 @@ public:
|
||||
/// Calling this method invalidates the cache and so requires a
|
||||
/// re-read.
|
||||
void invalidateBibinfoCache() const;
|
||||
/// Clear the bibfiles cache
|
||||
void clearBibFileCache() const;
|
||||
/// Updates the cached bibliography information, checking first to see
|
||||
/// whether the cache is valid. If so, we do nothing. If not, then we
|
||||
/// reload all the BibTeX info.
|
||||
|
@ -105,6 +105,7 @@ void InsetBibtex::doDispatch(Cursor & cur, FuncRequest & cmd)
|
||||
|
||||
cur.recordUndo();
|
||||
setParams(p);
|
||||
cur.buffer()->clearBibFileCache();
|
||||
cur.forceBufferUpdate();
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user