]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/winuniv.cpp
Remove unnecessary header dependencies. Fix resulting compilation
[wxWidgets.git] / src / univ / winuniv.cpp
index 1fbcf71f9613f73c753797eb67f29b873f8cc02f..f3bb6be5c0dd1d80611cb76ca8e2733a6e0ac8c0 100644 (file)
@@ -391,6 +391,19 @@ void wxWindow::Refresh(bool eraseBackground, const wxRect *rectClient)
 #endif // WXDEBUG_REFRESH
 
     wxWindowNative::Refresh(eraseBackground, &rectWin);
+
+    // Refresh all sub controls if any.
+    wxWindowList::Node *node = GetChildren().GetFirst();
+    while ( node )
+    {
+        wxWindow *win = node->GetData();
+        // Only refresh sub controls when it is visible 
+        // and when it is in the update region.
+        if(win->IsShown() && wxRegion(rectWin).Contains(win->GetRect()) != wxOutRegion)
+            win->Refresh(eraseBackground, &rectWin);
+            
+        node = node->GetNext();
+    }
 }
 
 // ----------------------------------------------------------------------------