From 1ff3e9aae5dfdf2cfeba4d8ec44c0640626f98ad Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 5 Apr 2012 22:27:26 +0000 Subject: [PATCH] Use wxFrame::FindItemInMenuBar() in ProcessCommand(). Don't duplicate FindItemInMenuBar() code in ProcessCommand() and, more importantly, use the overridden version of FindItemInMenuBar() in MDI parent frame in wxMSW to allow using ids corresponding to the active child frame menu items. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71112 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/framecmn.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/common/framecmn.cpp b/src/common/framecmn.cpp index 17633160c4..fc61d4e9ae 100644 --- a/src/common/framecmn.cpp +++ b/src/common/framecmn.cpp @@ -242,11 +242,7 @@ wxPoint wxFrameBase::GetClientAreaOrigin() const bool wxFrameBase::ProcessCommand(int id) { - wxMenuBar *bar = GetMenuBar(); - if ( !bar ) - return false; - - wxMenuItem *item = bar->FindItem(id); + wxMenuItem* const item = FindItemInMenuBar(id); if ( !item ) return false; -- 2.50.0