// Vadim Zeitlin (base MDI classes refactoring)
// Copyright: (c) 1998 Julian Smart
// (c) 2008 Vadim Zeitlin
-// RCS-ID: $Id$
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
event.GetEventType() == wxEVT_UPDATE_UI )
{
wxMDIChildFrame * const child = GetActiveChild();
- if ( child && child->ProcessWindowEventLocally(event) )
- return true;
+ if ( child )
+ {
+ // However avoid sending the event back to the child if it's
+ // currently being propagated to us from it.
+ wxWindow* const
+ from = static_cast<wxWindow*>(event.GetPropagatedFrom());
+ if ( !from || !from->IsDescendant(child) )
+ {
+ if ( child->ProcessWindowEventLocally(event) )
+ return true;
+ }
+ }
}
return wxFrame::TryBefore(event);