git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14193
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
+ // if it wasn't in a menu, try to find a button
+ if ( command != -1 )
+ {
+ wxWindow* child = win->FindWindow(command);
+ if ( child && wxDynamicCast(child, wxButton) )
+ {
+ wxCommandEvent eventCmd(wxEVT_COMMAND_BUTTON_CLICKED, command);
+ eventCmd.SetEventObject(child);
+ if ( child->GetEventHandler()->ProcessEvent(eventCmd) )
+ {
+ // skip "event.Skip()" below
+ return;
+ }
+ }
+ }
+
// don't propagate accels from the child frame to the parent one
break;
}
// don't propagate accels from the child frame to the parent one
break;
}