X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e4606ed9d0d0fb3c6b11e97185a66139ff703c35..df16a53ef9ae506c51023178e4fe45ce45e69447:/src/univ/combobox.cpp?ds=sidebyside diff --git a/src/univ/combobox.cpp b/src/univ/combobox.cpp index 76544591d4..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() @@ -775,7 +775,7 @@ wxClientData* wxComboBox::DoGetItemClientObject(int n) const // input handling // ---------------------------------------------------------------------------- -void wxComboControl::OnKey(wxCommandEvent& event) +void wxComboControl::OnKey(wxKeyEvent& event) { if ( m_isPopupShown ) { @@ -830,7 +830,7 @@ wxStdComboBoxInputHandler::wxStdComboBoxInputHandler(wxInputHandler *inphand) { } -bool wxStdComboBoxInputHandler::HandleKey(wxControl *control, +bool wxStdComboBoxInputHandler::HandleKey(wxInputConsumer *consumer, const wxKeyEvent& event, bool pressed) { @@ -850,13 +850,13 @@ bool wxStdComboBoxInputHandler::HandleKey(wxControl *control, if ( !!action ) { - control->PerformAction(action); + consumer->PerformAction(action); return TRUE; } } - return wxStdInputHandler::HandleKey(control, event, pressed); + return wxStdInputHandler::HandleKey(consumer, event, pressed); } #endif // wxUSE_COMBOBOX