Applied patch [ 578052 ] Doc/View and recursion problems
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16215 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -105,16 +105,28 @@ wxDocMDIChildFrame::~wxDocMDIChildFrame(void)
|
||||
// Extend event processing to search the view's event table
|
||||
bool wxDocMDIChildFrame::ProcessEvent(wxEvent& event)
|
||||
{
|
||||
static wxEvent *ActiveEvent = NULL;
|
||||
|
||||
// Break recursion loops
|
||||
if (ActiveEvent == &event)
|
||||
return false;
|
||||
|
||||
ActiveEvent = &event;
|
||||
|
||||
bool ret;
|
||||
if ( !m_childView || ! m_childView->ProcessEvent(event) )
|
||||
{
|
||||
// Only hand up to the parent if it's a menu command
|
||||
if (!event.IsKindOf(CLASSINFO(wxCommandEvent)) || !GetParent() || !GetParent()->ProcessEvent(event))
|
||||
return wxEvtHandler::ProcessEvent(event);
|
||||
ret = wxEvtHandler::ProcessEvent(event);
|
||||
else
|
||||
return TRUE;
|
||||
ret = TRUE;
|
||||
}
|
||||
else
|
||||
return TRUE;
|
||||
ret = TRUE;
|
||||
|
||||
ActiveEvent = NULL;
|
||||
return ret;
|
||||
}
|
||||
|
||||
void wxDocMDIChildFrame::OnActivate(wxActivateEvent& event)
|
||||
|
||||
Reference in New Issue
Block a user