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:
@@ -2548,7 +2548,7 @@ void wxAuiToolBar::OnLeftDown(wxMouseEvent& evt)
|
||||
{
|
||||
wxCommandEvent event(wxEVT_MENU, res);
|
||||
event.SetEventObject(this);
|
||||
GetParent()->GetEventHandler()->ProcessEvent(event);
|
||||
GetEventHandler()->ProcessEvent(event);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user