Don't set wxComboCtrl value twice

The value is set once in wxComboPopup::Dismiss() so there is no need to set it again and generate spurious EVT_TEXT event.

See #18260.
This commit is contained in:
Artur Wieczorek
2018-11-14 21:25:51 +01:00
parent edecb26899
commit ae3e581bb9

View File

@@ -219,18 +219,15 @@ void wxVListBoxComboPopup::DismissWithEvent()
int selection = wxVListBox::GetSelection();
Dismiss();
if ( selection != wxNOT_FOUND )
m_stringValue = m_strings[selection];
else
m_stringValue.clear();
if ( m_stringValue != m_combo->GetValue() )
m_combo->SetValueByUser(m_stringValue);
m_value = selection;
Dismiss();
SendComboBoxEvent(selection);
}