call AddChild() when the control is already reallly created
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29917 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
7561181f03
commit
488abb222a
@ -810,8 +810,6 @@ bool wxWindowMac::Create(wxWindowMac *parent, wxWindowID id,
|
||||
if ( !CreateBase(parent, id, pos, size, style, wxDefaultValidator, name) )
|
||||
return FALSE;
|
||||
|
||||
parent->AddChild(this);
|
||||
|
||||
m_windowVariant = parent->GetWindowVariant() ;
|
||||
|
||||
if ( m_macIsUserPane )
|
||||
@ -865,6 +863,7 @@ void wxWindowMac::MacPostControlCreate(const wxPoint& pos, const wxSize& size)
|
||||
wxASSERT_MSG( m_peer != NULL && m_peer->Ok() , wxT("No valid mac control") ) ;
|
||||
|
||||
m_peer->SetReference( (long) this ) ;
|
||||
GetParent()->AddChild(this);
|
||||
|
||||
MacInstallEventHandler( (WXWidget) m_peer->GetControlRef() );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user