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
This commit is contained in:
@@ -800,6 +800,9 @@ void wxSplitterWindow::SizeWindows()
|
|||||||
// Set pane for unsplit window
|
// Set pane for unsplit window
|
||||||
void wxSplitterWindow::Initialize(wxWindow *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_windowOne = window;
|
||||||
m_windowTwo = (wxWindow *) NULL;
|
m_windowTwo = (wxWindow *) NULL;
|
||||||
DoSetSashPosition(0);
|
DoSetSashPosition(0);
|
||||||
@@ -815,6 +818,9 @@ bool wxSplitterWindow::DoSplit(wxSplitMode mode,
|
|||||||
if ( IsSplit() )
|
if ( IsSplit() )
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
wxASSERT_MSG( window1->GetParent() == this && window2->GetParent() == this,
|
||||||
|
_T("windows in the splitter should have it as parent!") );
|
||||||
|
|
||||||
m_splitMode = mode;
|
m_splitMode = mode;
|
||||||
m_windowOne = window1;
|
m_windowOne = window1;
|
||||||
m_windowTwo = window2;
|
m_windowTwo = window2;
|
||||||
|
Reference in New Issue
Block a user