]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/app.cpp
Corrected problem with MDI children not refreshing (removed WS_CLIPCHILDREN).
[wxWidgets.git] / src / msw / app.cpp
index 31c1cd18492ff482f0c1327f2e543738ce16ae03..4c9218cb884be109906f1e7dfd9836539df64875 100644 (file)
@@ -331,6 +331,8 @@ void wxApp::CleanUp(void)
   if (wxWinHandleList)
     delete wxWinHandleList ;
     
+  // do it as the very last thing because everything else can log messages
+  delete wxLog::SetActiveTarget(NULL);
 }
 
 void wxApp::CommonInit(void)
@@ -816,8 +818,14 @@ void wxApp::OnIdle(wxIdleEvent& event)
   // 'Garbage' collection of windows deleted with Close().
   DeletePendingObjects();
 
+  // flush the logged messages if any
+  wxLog *pLog = wxLog::GetActiveTarget();
+  if ( pLog != NULL && pLog->HasPendingMessages() )
+    pLog->Flush();
+
   // Send OnIdle events to all windows
   bool needMore = SendIdleEvents();
+//  bool needMore = FALSE;
 
   if (needMore)
     event.RequestMore(TRUE);