]> git.lyx.org Git - features.git/commitdiff
Only restore the last applied style on initialization.
authorRichard Heck <rgheck@comcast.net>
Wed, 24 Mar 2010 14:34:05 +0000 (14:34 +0000)
committerRichard Heck <rgheck@comcast.net>
Wed, 24 Mar 2010 14:34:05 +0000 (14:34 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33852 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiCitation.cpp

index c54a5f2128cc3eb1a4802f314eaed7923739d46f..f485a6842df080ad172d94bb7b094d094d865655 100644 (file)
@@ -248,12 +248,6 @@ void GuiCitation::updateStyle()
        vector<CiteStyle>::const_iterator cit =
                std::find(styles.begin(), styles.end(), cs.style);
 
-       // restore the latest natbib style
-       if (style_ >= 0 && style_ < citationStyleCO->count())
-               citationStyleCO->setCurrentIndex(style_);
-       else
-               citationStyleCO->setCurrentIndex(0);
-
        if (cit != styles.end()) {
                int const i = int(cit - styles.begin());
                citationStyleCO->setCurrentIndex(i);
@@ -531,6 +525,11 @@ void GuiCitation::init()
        fillFields(bi);
        fillEntries(bi);
        updateControls(bi);
+       // restore the last used natbib style
+       if (style_ >= 0 && style_ < citationStyleCO->count())
+               citationStyleCO->setCurrentIndex(style_);
+       else
+               citationStyleCO->setCurrentIndex(0);
 }