mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-24 13:48:59 +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
101104bf5e
commit
54cbc7f7bb
@ -45,7 +45,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 */)
|
||||
@ -104,8 +113,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
|
||||
//@{
|
||||
|
@ -98,6 +98,8 @@ What's new
|
||||
|
||||
- Use document language when exporting citations to LyXHTML (bug 7732).
|
||||
|
||||
- Reordering citations in LyX is now rendered in the output (bug 6955).
|
||||
|
||||
- Fix InsetLayout's LatexParam output: \begin{inset}[latexparam].
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user