From e4315700228573d42a9afb1498fec4ee7b95ccb0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Mon, 19 Nov 2001 23:53:42 +0000 Subject: [PATCH] fix for wxComboBox::GetSelection from inside event handler git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12496 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/univ/combobox.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/univ/combobox.cpp b/src/univ/combobox.cpp index ec71609c58..dc644e1699 100644 --- a/src/univ/combobox.cpp +++ b/src/univ/combobox.cpp @@ -520,7 +520,10 @@ bool wxComboListBox::SetSelection(const wxString& value) void wxComboListBox::OnSelect(wxCommandEvent& event) { - // first let the user code have the event + // first update the combo and close the listbox + m_combo->OnSelect(event.GetString()); + + // next let the user code have the event // all fields are already filled by the listbox, just change the event // type and send it to the combo @@ -529,9 +532,6 @@ void wxComboListBox::OnSelect(wxCommandEvent& event) event2.SetEventObject(m_combo); event2.SetId(m_combo->GetId()); m_combo->ProcessEvent(event2); - - // next update the combo and close the listbox - m_combo->OnSelect(event.GetString()); } void wxComboListBox::OnShow() -- 2.45.2