From 59e0cb8f85f0d2f985b31532dd3308315659c662 Mon Sep 17 00:00:00 2001 From: Julien Rioux Date: Mon, 12 Dec 2011 16:04:00 +0000 Subject: [PATCH] Remove the .aux and .bbl files and update the citation labels 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 | 26 ++++++++++++++++---------- src/frontends/qt4/GuiDocument.h | 1 + 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/src/frontends/qt4/GuiDocument.cpp b/src/frontends/qt4/GuiDocument.cpp index 061b5f6c88..2f8eb7d794 100644 --- a/src/frontends/qt4/GuiDocument.cpp +++ b/src/frontends/qt4/GuiDocument.cpp @@ -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_); diff --git a/src/frontends/qt4/GuiDocument.h b/src/frontends/qt4/GuiDocument.h index 09fa731015..bb71c9455c 100644 --- a/src/frontends/qt4/GuiDocument.h +++ b/src/frontends/qt4/GuiDocument.h @@ -105,6 +105,7 @@ private Q_SLOTS: void browseMaster(); void classChanged(); void languagePackageChanged(int); + void biblioChanged(); void bibtexChanged(int); void updateModuleInfo(); void modulesChanged(); -- 2.39.2