Fix handler for wxEVT_MENU from dropdowns in wxAuiToolBar

Send this event to the toolbar own event handler instead of sending it to the
parent, the event will be propagated upwards anyhow, but doing it like this
also allows to process it in the toolbar itself and is consistent with the
other events generated in this code.

Closes #17613.
This commit is contained in:
rom 2016-08-04 23:47:21 +02:00 committed by Vadim Zeitlin
parent a352e95a30
commit e300f28976

View File

@ -2548,7 +2548,7 @@ void wxAuiToolBar::OnLeftDown(wxMouseEvent& evt)
{
wxCommandEvent event(wxEVT_MENU, res);
event.SetEventObject(this);
GetParent()->GetEventHandler()->ProcessEvent(event);
GetEventHandler()->ProcessEvent(event);
}
}