X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/635eb8bcc44d0bec40bcfa7e5cc8c6be1a0c7b96..25d599ae91f2a57fa942625f2ff65fb6b3e2c014:/src/univ/winuniv.cpp diff --git a/src/univ/winuniv.cpp b/src/univ/winuniv.cpp index 1fbcf71f96..f3bb6be5c0 100644 --- a/src/univ/winuniv.cpp +++ b/src/univ/winuniv.cpp @@ -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(); + } } // ----------------------------------------------------------------------------