avoid duplicating wxWindow::HandleCommand() in wxFrame, only handle the commands for the frame menu bar elements there: this avoid generating duplicate events if a command event handler skips
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54498 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -5093,12 +5093,8 @@ bool wxWindowMSW::HandleCommand(WXWORD id_, WXWORD cmd, WXHWND control)
|
||||
// coming from a control to wxEVT_COMMAND_MENU_SELECTED
|
||||
if ( !control )
|
||||
{
|
||||
// If no child window, it may be an accelerator, e.g. for a popup menu
|
||||
// command
|
||||
|
||||
wxCommandEvent event(wxEVT_COMMAND_MENU_SELECTED);
|
||||
wxCommandEvent event(wxEVT_COMMAND_MENU_SELECTED, id);
|
||||
event.SetEventObject(this);
|
||||
event.SetId(id);
|
||||
event.SetInt(id);
|
||||
|
||||
return HandleWindowEvent(event);
|
||||
|
Reference in New Issue
Block a user