From ab022a5c7a184fbfb2081274ad0f41619aa4dde7 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 12 Dec 2004 00:09:40 +0000 Subject: [PATCH] don't look for notebooks beyond first top level parent in our hierarchy git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30938 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/control.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/msw/control.cpp b/src/msw/control.cpp index 8a8bbee16d..3ab9e10eea 100644 --- a/src/msw/control.cpp +++ b/src/msw/control.cpp @@ -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 ) { -- 2.50.0