mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Force BibTeX rerun upon add/remove/change citation (fixes #6955).
Reordering citations is one case where catching "Citation undefined on page ..." doesn't catch the need for a bibtex rerun. This patch ensures the proper ordering is obtained in pdf output without having to resort to closing and reopening the LyX document.
This commit is contained in:
parent
26b67dcb49
commit
2ffd130d2b
@ -44,7 +44,16 @@ ParamInfo InsetCitation::param_info_;
|
||||
|
||||
InsetCitation::InsetCitation(Buffer * buf, InsetCommandParams const & p)
|
||||
: InsetCommand(buf, p)
|
||||
{}
|
||||
{
|
||||
buffer().removeBiblioTempFiles();
|
||||
}
|
||||
|
||||
|
||||
InsetCitation::~InsetCitation()
|
||||
{
|
||||
if (isBufferLoaded())
|
||||
buffer().removeBiblioTempFiles();
|
||||
}
|
||||
|
||||
|
||||
ParamInfo const & InsetCitation::findInfo(string const & /* cmdName */)
|
||||
@ -105,8 +114,10 @@ bool InsetCitation::isCompatibleCommand(string const & cmd)
|
||||
|
||||
void InsetCitation::doDispatch(Cursor & cur, FuncRequest & cmd)
|
||||
{
|
||||
if (cmd.action() == LFUN_INSET_MODIFY)
|
||||
if (cmd.action() == LFUN_INSET_MODIFY) {
|
||||
buffer().removeBiblioTempFiles();
|
||||
cache.recalculate = true;
|
||||
}
|
||||
InsetCommand::doDispatch(cur, cmd);
|
||||
}
|
||||
|
||||
|
@ -31,6 +31,8 @@ class InsetCitation : public InsetCommand
|
||||
public:
|
||||
///
|
||||
InsetCitation(Buffer * buf, InsetCommandParams const &);
|
||||
///
|
||||
~InsetCitation();
|
||||
|
||||
/// \name Public functions inherited from Inset class
|
||||
//@{
|
||||
|
Loading…
Reference in New Issue
Block a user