X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f7bd26981f1c8d46d3909e3de90df081de4df33b..e79848acfe012f03286bc8bc4de1a7694ee6c516:/src/common/docmdi.cpp diff --git a/src/common/docmdi.cpp b/src/common/docmdi.cpp index 245a131de7..a0de68f3d4 100644 --- a/src/common/docmdi.cpp +++ b/src/common/docmdi.cpp @@ -102,14 +102,12 @@ wxDocMDIChildFrame::wxDocMDIChildFrame(wxDocument *doc, wxView *view, wxMDIParen wxDocMDIChildFrame::~wxDocMDIChildFrame(void) { + m_childView = (wxView *) NULL; } // Extend event processing to search the view's event table bool wxDocMDIChildFrame::ProcessEvent(wxEvent& event) { - if (m_childView) - m_childView->Activate(TRUE); - if ( !m_childView || ! m_childView->ProcessEvent(event) ) { // Only hand up to the parent if it's a menu command @@ -126,7 +124,7 @@ void wxDocMDIChildFrame::OnActivate(wxActivateEvent& event) { wxMDIChildFrame::OnActivate(event); - if (m_childView) + if (event.GetActive() && m_childView) m_childView->Activate(event.GetActive()); } @@ -141,8 +139,8 @@ bool wxDocMDIChildFrame::OnClose(void) { m_childView->Activate(FALSE); delete m_childView; - m_childView = NULL; - m_childDocument = NULL; + m_childView = (wxView *) NULL; + m_childDocument = (wxDocument *) NULL; } return ans;