Jürgen Spitzmüller wrote:
> Attached is a quick and easy fix for branch.

Even better: this.

Jürgen
Index: src/frontends/qt4/TocWidget.cpp
===================================================================
--- src/frontends/qt4/TocWidget.cpp	(Revision 22920)
+++ src/frontends/qt4/TocWidget.cpp	(Arbeitskopie)
@@ -248,21 +248,13 @@
 		return;
 	}
 
-	QString current_text = typeCO->currentText();
-	//lyxerr << "current_text " << fromqstr(current_text) << endl;
 	typeCO->blockSignals(true);
 	typeCO->clear();
-	int current_type = -1;
 	for (size_t i = 0; i != type_names.size(); ++i) {
 		QString item = toqstr(type_names[i]);
 		typeCO->addItem(item);
-		if (item == current_text)
-			current_type = i;
 	}
-	if (current_type != -1)
-		typeCO->setCurrentIndex(current_type);
-	else
-		typeCO->setCurrentIndex(form_->selectedType());
+	typeCO->setCurrentIndex(form_->selectedType());
 	typeCO->blockSignals(false);
 
 	setTocModel(typeCO->currentIndex());

Reply via email to