From: Vadim Zeitlin Date: Sun, 23 Jun 2013 13:08:41 +0000 (+0000) Subject: Also propagate wxEVT_UPDATE_UI to the child MDI frame. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/015a04705d2e254dfdb32afd94489a7671a180e8 Also propagate wxEVT_UPDATE_UI to the child MDI frame. It seems to make sense to handle wxEVT_UPDATE_UI in the same way as wxEVT_MENU as they are often used together. This allows to handle e.g. toolbar buttons entirely in the child MDI frame, without any involvement from the parent. See #14314. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74276 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/mdi.cpp b/src/msw/mdi.cpp index 1e5a7f39f5..e78625d9f0 100644 --- a/src/msw/mdi.cpp +++ b/src/msw/mdi.cpp @@ -702,7 +702,8 @@ bool wxMDIParentFrame::TryBefore(wxEvent& event) { // menu (and toolbar) events should be sent to the active child frame // first, if any - if ( event.GetEventType() == wxEVT_MENU ) + if ( event.GetEventType() == wxEVT_MENU || + event.GetEventType() == wxEVT_UPDATE_UI ) { wxMDIChildFrame * const child = GetActiveChild(); if ( child && child->ProcessWindowEventLocally(event) )