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:
Vadim Zeitlin
2008-07-05 20:51:16 +00:00
parent 2587df2c82
commit a6ac49b198
4 changed files with 59 additions and 60 deletions

View File

@@ -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);