Clear styles widgets only if needed.

This commit is contained in:
Juergen Spitzmueller 2017-01-13 10:57:53 +01:00
parent 013515e450
commit d401a46267

View 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()) {