]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/docmdi.cpp
changed wxMatchWild() 3rd parameter not used under Unix - what is it good for?
[wxWidgets.git] / src / common / docmdi.cpp
index dcf4e7d460316b4a0a9e9f6bcdeb338e576a4de4..a0de68f3d45766828f374f6e29cc4c7268076268 100644 (file)
@@ -102,15 +102,12 @@ wxDocMDIChildFrame::wxDocMDIChildFrame(wxDocument *doc, wxView *view, wxMDIParen
 
 wxDocMDIChildFrame::~wxDocMDIChildFrame(void)
 {
-       m_childView = NULL;
+       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
@@ -127,7 +124,7 @@ void wxDocMDIChildFrame::OnActivate(wxActivateEvent& event)
 {
   wxMDIChildFrame::OnActivate(event);
 
-  if (m_childView)
+  if (event.GetActive() && m_childView)
     m_childView->Activate(event.GetActive());
 }
 
@@ -142,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;