]> git.saurik.com Git - wxWidgets.git/commitdiff
fix for wxComboBox::GetSelection from inside event handler
authorVáclav Slavík <vslavik@fastmail.fm>
Mon, 19 Nov 2001 23:53:42 +0000 (23:53 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Mon, 19 Nov 2001 23:53:42 +0000 (23:53 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12496 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/univ/combobox.cpp

index ec71609c58105d1c1e0f63b4a33b37ee2aea9ac9..dc644e1699d1ed8012946d150aea74e53587a9f5 100644 (file)
@@ -520,7 +520,10 @@ bool wxComboListBox::SetSelection(const wxString& value)
 
 void wxComboListBox::OnSelect(wxCommandEvent& event)
 {
 
 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
 
     // 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);
     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()
 }
 
 void wxComboListBox::OnShow()