From 21131143d58c4c2c24d529b421285bec59473f1b Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Wed, 6 Oct 2004 17:04:05 +0000 Subject: [PATCH] wxMDIChildFrame::IsTopLevel returns false but for this purpose we should use the MDI Child, not it's parent. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29674 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- contrib/src/gizmos/dynamicsash.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/contrib/src/gizmos/dynamicsash.cpp b/contrib/src/gizmos/dynamicsash.cpp index fa9ee2d622..08d1cecac7 100644 --- a/contrib/src/gizmos/dynamicsash.cpp +++ b/contrib/src/gizmos/dynamicsash.cpp @@ -27,6 +27,10 @@ #include "wx/wx.h" #endif +#ifdef __WXMSW__ +#include "wx/mdi.h" +#endif + #include "wx/gizmos/dynamicsash.h" @@ -452,7 +456,11 @@ wxWindow *wxDynamicSashWindowImpl::FindFrame() const { wxWindow *win; win = m_window->GetParent(); - while (win && !win->IsTopLevel()) { + while (win && !win->IsTopLevel() +#ifdef __WXMSW__ + && ! wxIsKindOf(win, wxMDIChildFrame) // not top-level but still a frame +#endif + ) { win = win->GetParent(); } -- 2.45.2