]> git.lyx.org Git - features.git/commitdiff
Clear styles widgets only if needed.
authorJuergen Spitzmueller <spitz@lyx.org>
Fri, 13 Jan 2017 09:57:53 +0000 (10:57 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Fri, 13 Jan 2017 09:57:53 +0000 (10:57 +0100)
src/frontends/qt4/GuiDocument.cpp

index f7f00795ab6aafe198731a02259e0772767df9d4..b89082558c687666d2dba74126d4352885531bc6 100644 (file)
@@ -3758,14 +3758,13 @@ void GuiDocument::updateDefaultBiblio(string const & style,
 {
        QString const bibstyle = toqstr(style);
        biblioModule->defaultBiblioCO->clear();
-       biblioModule->biblatexBbxCO->clear();
-       biblioModule->biblatexCbxCO->clear();
 
        int item_nr = -1;
 
        if (isBiblatex()) {
                if (which != "cbx") {
                        // First the bbx styles
+                       biblioModule->biblatexBbxCO->clear();
                        QStringList str = texFileList("bbxFiles.lst");
                        // test whether we have a valid list, otherwise run rescan
                        if (str.isEmpty()) {
@@ -3797,6 +3796,7 @@ void GuiDocument::updateDefaultBiblio(string const & style,
 
                if (which != "bbx") {
                        // now the cbx styles
+                       biblioModule->biblatexCbxCO->clear();
                        QStringList str = texFileList("cbxFiles.lst");
                        // test whether we have a valid list, otherwise run rescan
                        if (str.isEmpty()) {
@@ -3826,6 +3826,8 @@ void GuiDocument::updateDefaultBiblio(string const & style,
                                biblioModule->biblatexCbxCO->clearEditText();
                }
        } else {// BibTeX
+               biblioModule->biblatexBbxCO->clear();
+               biblioModule->biblatexCbxCO->clear();
                QStringList str = texFileList("bstFiles.lst");
                // test whether we have a valid list, otherwise run rescan
                if (str.isEmpty()) {