Set the window in focus event sent by wxComboCtrl correctly.
The window parameter wasn't copied correctly in the forwarded event. Fix this and avoid future problems of the same kind by using the copy ctor for creating the new event and then override the fields that we need to change from the original event instead of recreating the new event from bits and pieces of the original one. Closes #12741. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66314 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -673,7 +673,8 @@ void wxComboBoxExtraInputHandler::OnFocus(wxFocusEvent& event)
|
||||
// wxEVT_SET_FOCUSes (since m_text->SetFocus is called
|
||||
// from combo's focus event handler), they should be quite
|
||||
// harmless.
|
||||
wxFocusEvent evt2(event.GetEventType(),m_combo->GetId());
|
||||
wxFocusEvent evt2(event);
|
||||
evt2.SetId(m_combo->GetId());
|
||||
evt2.SetEventObject(m_combo);
|
||||
m_combo->GetEventHandler()->ProcessEvent(evt2);
|
||||
|
||||
|
Reference in New Issue
Block a user