From fe6dc50a2e6d51322a4bf85e6b2336229b671f63 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 28 May 2002 11:29:26 +0000 Subject: [PATCH] added asserts to ensure that the splitter windows have it as parent (otherwise they're not positioned correctly) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15696 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/splitter.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/generic/splitter.cpp b/src/generic/splitter.cpp index c6841bc9dc..5e293514bd 100644 --- a/src/generic/splitter.cpp +++ b/src/generic/splitter.cpp @@ -800,6 +800,9 @@ void wxSplitterWindow::SizeWindows() // Set pane for unsplit window void wxSplitterWindow::Initialize(wxWindow *window) { + wxASSERT_MSG( window->GetParent() == this, + _T("windows in the splitter should have it as parent!") ); + m_windowOne = window; m_windowTwo = (wxWindow *) NULL; DoSetSashPosition(0); @@ -815,6 +818,9 @@ bool wxSplitterWindow::DoSplit(wxSplitMode mode, if ( IsSplit() ) return FALSE; + wxASSERT_MSG( window1->GetParent() == this && window2->GetParent() == this, + _T("windows in the splitter should have it as parent!") ); + m_splitMode = mode; m_windowOne = window1; m_windowTwo = window2; -- 2.47.2