diff --git a/src/qt/choice.cpp b/src/qt/choice.cpp index 4bc672b71e..20c9dac7fb 100644 --- a/src/qt/choice.cpp +++ b/src/qt/choice.cpp @@ -240,6 +240,12 @@ void wxChoice::DoClear() void wxChoice::DoDeleteOneItem(unsigned int pos) { + const int selection = GetSelection(); + + if ( selection >= 0 && static_cast(selection) == pos ) + { + SetSelection( wxNOT_FOUND ); + } m_qtComboBox->removeItem(pos); }