summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gui/widgets/qfontcombobox.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gui/widgets/qfontcombobox.cpp b/src/gui/widgets/qfontcombobox.cpp
index 806db59..a66657d 100644
--- a/src/gui/widgets/qfontcombobox.cpp
+++ b/src/gui/widgets/qfontcombobox.cpp
@@ -247,7 +247,14 @@ void QFontComboBoxPrivate::_q_updateModel()
}
list = result;
+ //we need to block the signals so that the model doesn't emit reset
+ //this prevents the current index from changing
+ //it will be updated just after this
+ ///TODO: we should finda way to avoid blocking signals and have a real update of the model
+ const bool old = m->blockSignals(true);
m->setStringList(list);
+ m->blockSignals(old);
+
if (list.isEmpty()) {
if (currentFont != QFont()) {
currentFont = QFont();