]> git.saurik.com Git - wxWidgets.git/commitdiff
wxMDIChildFrame::IsTopLevel returns false but for this purpose we
authorRobin Dunn <robin@alldunn.com>
Wed, 6 Oct 2004 17:04:05 +0000 (17:04 +0000)
committerRobin Dunn <robin@alldunn.com>
Wed, 6 Oct 2004 17:04:05 +0000 (17:04 +0000)
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

index fa9ee2d62287735dbd88566cee899f74ed08e9da..08d1cecac76a4aa572ae9528b2245843cd3552bd 100644 (file)
     #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();
     }