Change to wxWindow::HandleCommand to allow accelerators to work even if there
is no corresponding child window. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5498 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
ff0ea71cea
commit
a84fc80be3
@ -2997,6 +2997,17 @@ bool wxWindow::HandleCommand(WXWORD id, WXWORD cmd, WXHWND control)
|
||||
|
||||
if ( win )
|
||||
return win->MSWCommand(cmd, id);
|
||||
else
|
||||
{
|
||||
// If no child window, it may be an accelerator, e.g. for
|
||||
// a popup menu command.
|
||||
|
||||
wxCommandEvent event(wxEVT_COMMAND_MENU_SELECTED);
|
||||
event.SetEventObject(this);
|
||||
event.SetId(id);
|
||||
event.SetInt(id);
|
||||
return ProcessEvent(event);
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user