From ae3e581bb9cdb449e36d89700d5b0531ad85d5f5 Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Wed, 14 Nov 2018 21:25:51 +0100 Subject: [PATCH] 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. --- src/generic/odcombo.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/generic/odcombo.cpp b/src/generic/odcombo.cpp index dace6230a4..7eb5692256 100644 --- a/src/generic/odcombo.cpp +++ b/src/generic/odcombo.cpp @@ -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); }