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());
// 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);
}
}
bool QBibtex::isValid()
{
- return dialog_->databaseLB->count() != 0 &&
- !string(dialog_->styleCB->text(0)).empty();
+ return dialog_->databaseLB->count() != 0;
}