diff --git a/src/qt/choice.cpp b/src/qt/choice.cpp index 20c9dac7fb..491398b718 100644 --- a/src/qt/choice.cpp +++ b/src/qt/choice.cpp @@ -212,11 +212,17 @@ int wxChoice::DoInsertItems(const wxArrayStringsAdapter & items, int wxChoice::DoInsertOneItem(const wxString& item, unsigned int pos) { + // Maintain unselected state + const bool unselected = m_qtComboBox->currentIndex() == -1; + m_qtComboBox->insertItem(pos, wxQtConvertString(item)); if ( IsSorted() ) m_qtComboBox->model()->sort(0); + if ( unselected ) + m_qtComboBox->setCurrentIndex(-1); + return pos; }