The branch, 2.0.x, has been updated.

- Log -----------------------------------------------------------------

commit 54cbc7f7bbab961e7576df582d7017e5b8649849
Author: Julien Rioux <jri...@lyx.org>
Date:   Sat Jan 12 01:04:07 2013 +0100

    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.

diff --git a/src/insets/InsetCitation.cpp b/src/insets/InsetCitation.cpp
index d3f9271..c8078b9 100644
--- a/src/insets/InsetCitation.cpp
+++ b/src/insets/InsetCitation.cpp
@@ -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);
 }
 
diff --git a/src/insets/InsetCitation.h b/src/insets/InsetCitation.h
index 6eb0da0..6061938 100644
--- a/src/insets/InsetCitation.h
+++ b/src/insets/InsetCitation.h
@@ -31,6 +31,8 @@ class InsetCitation : public InsetCommand
 public:
        ///
        InsetCitation(Buffer * buf, InsetCommandParams const &);
+       ///
+       ~InsetCitation();
 
        /// \name Public functions inherited from Inset class
        //@{
diff --git a/status.20x b/status.20x
index 1815a24..e8fd820 100644
--- a/status.20x
+++ b/status.20x
@@ -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].
 
 

-----------------------------------------------------------------------

Summary of changes:
 src/insets/InsetCitation.cpp |   15 +++++++++++++--
 src/insets/InsetCitation.h   |    2 ++
 status.20x                   |    2 ++
 3 files changed, 17 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
The LyX Source Repository

Reply via email to