I'm not sure how to handle this. I have two .bst files with the same name:
/usr/local/texlive/2011/texmf-dist/bibtex/bst/beebe/econometrica.bst
/usr/local/texlive/2011/texmf-dist/bibtex/bst/economic/econometrica.bst

Because of this I get duplicate entries when choosing a bibstyle in the bibtex 
inset dialog. Choosing one of the duplicate entries has the same effect as 
choosing another because only the name, not the path, is passed in the end. The 
attached patch makes it so the inset does not display duplicate entries. I'm 
not sure this is the way to go. Maybe the duplicate entries should be left so 
that the user knows there is more than one entry with the same name.

Any comments?

Thanks,

Scott
diff --git a/src/frontends/qt4/GuiBibtex.cpp b/src/frontends/qt4/GuiBibtex.cpp
index 6dd8d8f..4ef68ef 100644
--- a/src/frontends/qt4/GuiBibtex.cpp
+++ b/src/frontends/qt4/GuiBibtex.cpp
@@ -342,11 +342,15 @@ void GuiBibtex::updateContents()
 	int item_nr = -1;
 
 	QStringList str = bibStyles();
+	QString prevItem("?*?*");
 	for (int i = 0; i != str.count(); ++i) {
 		QString item = changeExtension(str[i], "");
 		if (item == bibstyle)
 			item_nr = i;
-		styleCB->addItem(item);
+		if (item != prevItem) {
+			styleCB->addItem(item);
+			prevItem = item;
+		}
 	}
 
 	if (item_nr == -1 && !bibstyle.isEmpty()) {

Reply via email to