]> git.saurik.com Git - wxWidgets.git/commitdiff
Applied patch [ 668155 ] Refresh problem when msgbox is shown
authorJulian Smart <julian@anthemion.co.uk>
Fri, 24 Jan 2003 12:29:06 +0000 (12:29 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Fri, 24 Jan 2003 12:29:06 +0000 (12:29 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18904 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/toback24.txt
src/univ/winuniv.cpp

index 0cd96fe51f43738272160c472d95a7352776d634..8ec2832246b07e1058129700c69c427e2c221481 100644 (file)
@@ -234,3 +234,33 @@ Checking in docs/latex/wx/progdlg.tex;
 new revision: 1.10; previous revision: 1.9
 done
 
+21. [ 668155 ] Refresh problem when msgbox is shown (wxUniversal)
+
+https://sourceforge.net/tracker/index.php?func=detail&aid=668155&group_id=9863&atid=309863
+
+Index: e:/dev/wxWindows/src/univ/winuniv.cpp
+===================================================================
+RCS file: /pack/cvsroots/wxwindows/wxWindows/src/univ/winuniv.cpp,v
+retrieving revision 1.35
+diff -u -2 -r1.35 winuniv.cpp
+--- e:/dev/wxWindows/src/univ/winuniv.cpp      2002/12/09 10:19:08     1.35
++++ e:/dev/wxWindows/src/univ/winuniv.cpp      2003/01/14 21:24:21
+@@ -392,4 +392,17 @@
+     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();
++    }
+ }
+
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();
+    }
 }
 
 // ----------------------------------------------------------------------------