]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt2/QBibtex.C
better selection and scrolling behaviour
[lyx.git] / src / frontends / qt2 / QBibtex.C
index 35debd01e49696a4fe1457e82f425ad64a9bfc0b..c7baee42256cff16b60b8f79ce84bb020e826d04 100644 (file)
@@ -92,14 +92,14 @@ void QBibtex::update_contents()
 
 
        dialog_->styleCB->clear();
+
        int item_nr(-1);
+
        vector<string> const str = getVectorFromString(
                controller().getBibStyles(), "\n");
        for (vector<string>::const_iterator it = str.begin();
                it != str.end(); ++it) {
-               string item(ChangeExtension(*it, "")); 
+               string item(ChangeExtension(*it, ""));
                if (item == bibstyle)
                        item_nr = int(it - str.begin());
                dialog_->styleCB->insertItem(item.c_str());
@@ -136,7 +136,9 @@ void QBibtex::apply()
                // bibtotoc and no style
                controller().params().setOptions("bibtotoc");
        } else {
-               // only style. An empty one is valid!
+               // only style. An empty one is valid, because some
+               // documentclasses have an own \bibliographystyle{}
+               // command!
                controller().params().setOptions(bibstyle);
        }
 }
@@ -144,6 +146,5 @@ void QBibtex::apply()
 
 bool QBibtex::isValid()
 {
-       return dialog_->databaseLB->count() != 0 &&
-               !string(dialog_->styleCB->text(0)).empty();
+       return dialog_->databaseLB->count() != 0;
 }