]> git.lyx.org Git - lyx.git/commitdiff
Move some code to applyView().
authorJulien Rioux <jrioux@lyx.org>
Mon, 12 Dec 2011 16:38:04 +0000 (16:38 +0000)
committerJulien Rioux <jrioux@lyx.org>
Mon, 12 Dec 2011 16:38:04 +0000 (16:38 +0000)
Previous commit did not distinguish whether the changes were applied or cancelled.

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

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

index 2f8eb7d794d4a44a9e3051b9cc391082c59640aa..f7cffd1a78947e352591f35cedd4b4b9fa945279 100644 (file)
@@ -1990,8 +1990,7 @@ void GuiDocument::languagePackageChanged(int i)
 
 void GuiDocument::biblioChanged()
 {
-       buffer().invalidateBibinfoCache();
-       buffer().removeBiblioTempFiles();
+       biblioChanged_ = true;
        changed();
 }
 
@@ -2264,6 +2263,11 @@ void GuiDocument::applyView()
        else
                bp_.bibtex_command = bibtex_command + " " + bibtex_options;
 
+       if (biblioChanged_) {
+               buffer().invalidateBibinfoCache();
+               buffer().removeBiblioTempFiles();
+       }
+
        // Indices
        indicesModule->apply(bp_);
 
index bb71c9455c11305e25cff5ce6dd5d7866088eec1..fa0e504d292ac4edb88b1e46586f724f11ac3386 100644 (file)
@@ -249,6 +249,8 @@ private:
        std::map<docstring, docstring> changedBranches_;
        ///
        std::list<std::string> includeonlys_;
+       ///
+       bool biblioChanged_;
 };