#include "BufferParams.h"
#include "BufferView.h"
#include "DispatchResult.h"
+#include "FuncCode.h"
+#include "FuncRequest.h"
#include "LaTeXFeatures.h"
#include "output_xhtml.h"
#include "ParIterator.h"
}
+void InsetCitation::doDispatch(Cursor & cur, FuncRequest & cmd)
+{
+ if (cmd.action() == LFUN_INSET_MODIFY)
+ cache.recalculate = true;
+ InsetCommand::doDispatch(cur, cmd);
+}
+
+
docstring InsetCitation::toolTip(BufferView const & bv, int, int) const
{
Buffer const & buf = bv.buffer();
void InsetCitation::updateBuffer(ParIterator const &, UpdateType)
{
- CiteEngine const engine = buffer().params().citeEngine();
- if (cache.params == params() && cache.engine == engine)
+ if (!cache.recalculate && buffer().citeLabelsValid())
return;
- // The label has changed, so we have to re-create it.
+ // The label may have changed, so we have to re-create it.
docstring const glabel = generateLabel();
unsigned int const maxLabelChars = 45;
label += "...";
}
- cache.engine = engine;
- cache.params = params();
+ cache.recalculate = false;
cache.generated_label = glabel;
cache.screen_label = label;
}