From de2a58d986739bccb83615e8515d715ebf1b5821 Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Thu, 30 Jun 2016 14:53:19 -0400 Subject: [PATCH] Fix bug #8782. We need to invalidate the BibTeX cache when undoing or redoing. I do not like having to do it for every undo or redo. We should only have to do it if we restored or deleted an InsetBibTeX. But there is no way, so far as I can see, to do it that way. I tried. (cherry picked from commit 02847641a8b97a57d1866120bb446427e0bda7a4) --- src/BufferView.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/BufferView.cpp b/src/BufferView.cpp index efe7e540da..bd5a944386 100644 --- a/src/BufferView.cpp +++ b/src/BufferView.cpp @@ -1354,6 +1354,13 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr) else dr.screenUpdate(Update::Force | Update::FitCursor); dr.forceBufferUpdate(); + // we only need to do this if we have deleted or restored a + // BiBTeX inset. but there is no other place to do it. one + // obvious idea is to try to do it in a copy constructor for + // InsetBibTeX, but when that is invoked, the buffer_ member + // is not yet set. + buffer().invalidateBibfileCache(); + buffer().removeBiblioTempFiles(); break; case LFUN_REDO: @@ -1364,6 +1371,9 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr) else dr.screenUpdate(Update::Force | Update::FitCursor); dr.forceBufferUpdate(); + // see above + buffer().invalidateBibfileCache(); + buffer().removeBiblioTempFiles(); break; case LFUN_FONT_STATE: -- 2.39.5