]> git.lyx.org Git - lyx.git/commitdiff
Remove the .aux and .bbl files and update the citation labels
authorJulien Rioux <jrioux@lyx.org>
Mon, 12 Dec 2011 16:04:00 +0000 (16:04 +0000)
committerJulien Rioux <jrioux@lyx.org>
Mon, 12 Dec 2011 16:04:00 +0000 (16:04 +0000)
iff bibliography settings are changed in the document settings.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40486 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiDocument.cpp
src/frontends/qt4/GuiDocument.h

index 061b5f6c88d84d28407453ee3930480350900f92..2f8eb7d794d4a44a9e3051b9cc391082c59640aa 100644 (file)
@@ -1106,21 +1106,21 @@ GuiDocument::GuiDocument(GuiView & lv)
        connect(biblioModule->citeNatbibRB, SIGNAL(toggled(bool)),
                biblioModule->citeStyleCO, SLOT(setEnabled(bool)));
        connect(biblioModule->citeDefaultRB, SIGNAL(clicked()),
-               this, SLOT(change_adaptor()));
+               this, SLOT(biblioChanged()));
        connect(biblioModule->citeNatbibRB, SIGNAL(clicked()),
-               this, SLOT(change_adaptor()));
+               this, SLOT(biblioChanged()));
        connect(biblioModule->citeStyleCO, SIGNAL(activated(int)),
-               this, SLOT(change_adaptor()));
+               this, SLOT(biblioChanged()));
        connect(biblioModule->citeJurabibRB, SIGNAL(clicked()),
-               this, SLOT(change_adaptor()));
+               this, SLOT(biblioChanged()));
        connect(biblioModule->bibtopicCB, SIGNAL(clicked()),
-               this, SLOT(change_adaptor()));
+               this, SLOT(biblioChanged()));
        connect(biblioModule->bibtexCO, SIGNAL(activated(int)),
                this, SLOT(bibtexChanged(int)));
        connect(biblioModule->bibtexOptionsLE, SIGNAL(textChanged(QString)),
-               this, SLOT(change_adaptor()));
+               this, SLOT(biblioChanged()));
        connect(biblioModule->bibtexStyleLE, SIGNAL(textChanged(QString)),
-               this, SLOT(change_adaptor()));
+               this, SLOT(biblioChanged()));
 
        biblioModule->bibtexOptionsLE->setValidator(new NoNewLineValidator(
                biblioModule->bibtexOptionsLE));
@@ -1988,11 +1988,19 @@ void GuiDocument::languagePackageChanged(int i)
 }
 
 
+void GuiDocument::biblioChanged()
+{
+       buffer().invalidateBibinfoCache();
+       buffer().removeBiblioTempFiles();
+       changed();
+}
+
+
 void GuiDocument::bibtexChanged(int n)
 {
        biblioModule->bibtexOptionsLE->setEnabled(
                biblioModule->bibtexCO->itemData(n).toString() != "default");
-       changed();
+       biblioChanged();
 }
 
 
@@ -2256,8 +2264,6 @@ void GuiDocument::applyView()
        else
                bp_.bibtex_command = bibtex_command + " " + bibtex_options;
 
-       buffer().removeBiblioTempFiles();
-
        // Indices
        indicesModule->apply(bp_);
 
index 09fa73101570ae23e5e704f1102bfdd97e430f56..bb71c9455c11305e25cff5ce6dd5d7866088eec1 100644 (file)
@@ -105,6 +105,7 @@ private Q_SLOTS:
        void browseMaster();
        void classChanged();
        void languagePackageChanged(int);
+       void biblioChanged();
        void bibtexChanged(int);
        void updateModuleInfo();
        void modulesChanged();