with flashing.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33854
a592a061-630c-0410-9148-
cb99ea01b6c8
- int const oldIndex = citationStyleCO->currentIndex();
-
if (!selectedLV->selectionModel()->selectedIndexes().empty())
curr = selectedLV->selectionModel()->selectedIndexes()[0].row();
QStringList sty = citationStyles(bi, curr);
if (!selectedLV->selectionModel()->selectedIndexes().empty())
curr = selectedLV->selectionModel()->selectedIndexes()[0].row();
QStringList sty = citationStyles(bi, curr);
- citationStyleCO->clear();
if (sty.isEmpty()) {
// some error
citationStyleCO->setEnabled(false);
citationStyleLA->setEnabled(false);
if (sty.isEmpty()) {
// some error
citationStyleCO->setEnabled(false);
citationStyleLA->setEnabled(false);
+ citationStyleCO->clear();
+ citationStyleCO->blockSignals(true);
+
+ // save old index
+ int const oldIndex = citationStyleCO->currentIndex();
+ citationStyleCO->clear();
citationStyleCO->insertItems(0, sty);
citationStyleCO->setEnabled(true);
citationStyleLA->setEnabled(true);
citationStyleCO->insertItems(0, sty);
citationStyleCO->setEnabled(true);
citationStyleLA->setEnabled(true);
if (oldIndex != -1 && oldIndex < citationStyleCO->count())
citationStyleCO->setCurrentIndex(oldIndex);
if (oldIndex != -1 && oldIndex < citationStyleCO->count())
citationStyleCO->setCurrentIndex(oldIndex);
+
+ citationStyleCO->blockSignals(false);
+
+ // simulate a change of index to trigger updateFormatting().
+ on_citationStyleCO_currentIndexChanged(citationStyleCO->currentIndex());