Fixed popup menu processing
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@440 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -47,6 +47,7 @@
|
||||
extern wxList wxModelessWindows;
|
||||
extern wxList wxPendingDelete;
|
||||
extern char wxFrameClassName[];
|
||||
extern wxMenu *wxCurrentPopupMenu;
|
||||
|
||||
#if !USE_SHARED_LIBRARY
|
||||
BEGIN_EVENT_TABLE(wxFrame, wxWindow)
|
||||
@@ -735,6 +736,14 @@ bool wxFrame::MSWOnCommand(WXWORD id, WXWORD cmd, WXHWND control)
|
||||
if (win)
|
||||
return win->MSWCommand(cmd, id);
|
||||
|
||||
if (wxCurrentPopupMenu)
|
||||
{
|
||||
wxMenu *popupMenu = wxCurrentPopupMenu;
|
||||
wxCurrentPopupMenu = NULL;
|
||||
if (popupMenu->MSWCommand(cmd, id))
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (GetMenuBar() && GetMenuBar()->FindItemForId(id))
|
||||
{
|
||||
ProcessCommand(id);
|
||||
|
Reference in New Issue
Block a user