]> git.saurik.com Git - wxWidgets.git/commitdiff
don't look for notebooks beyond first top level parent in our hierarchy
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 12 Dec 2004 00:09:40 +0000 (00:09 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 12 Dec 2004 00:09:40 +0000 (00:09 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30938 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/control.cpp

index 8a8bbee16dcbae3a36ccfca671a4c13ede9bb682..3ab9e10eea79b20174c9862be1d58360fd9a2d16 100644 (file)
@@ -359,6 +359,12 @@ WXHBRUSH wxControl::MSWControlColor(WXHDC pDC)
     {
         for ( wxWindow *win = this; win; win = win->GetParent() )
         {
+            if ( win->IsTopLevel() )
+            {
+                // don't go beyond the first top level parent
+                break;
+            }
+
             wxNotebook *nbook = wxDynamicCast(win, wxNotebook);
             if ( nbook )
             {