don't assign the returned value in wxMDIParentFrame::OnCreateClient() to any member variables, this is the job of the caller (according to documentation and wxMSW code) (modified patch 1910602)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52537 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-03-15 03:12:47 +00:00
parent 2f74c9c6b5
commit 6e42617af4
6 changed files with 35 additions and 33 deletions

View File

@@ -120,11 +120,12 @@ bool wxGenericMDIParentFrame::Create(wxWindow *parent,
#endif // wxUSE_MENUS
}
wxFrame::Create( parent, id, title, pos, size, style, name );
if ( !wxFrame::Create( parent, id, title, pos, size, style, name ) )
return false;
OnCreateClient();
m_pClientWindow = OnCreateClient();
return true;
return m_pClientWindow != NULL;
}
#if wxUSE_MENUS
@@ -248,11 +249,10 @@ wxGenericMDIClientWindow *wxGenericMDIParentFrame::GetClientWindow() const
wxGenericMDIClientWindow *wxGenericMDIParentFrame::OnCreateClient()
{
#if wxUSE_GENERIC_MDI_AS_NATIVE
m_pClientWindow = new wxMDIClientWindow( this );
return new wxMDIClientWindow( this );
#else
m_pClientWindow = new wxGenericMDIClientWindow( this );
return new wxGenericMDIClientWindow( this );
#endif
return m_pClientWindow;
}
void wxGenericMDIParentFrame::ActivateNext()