From 488abb222abb22cd06acb5d5beeb40c28ee808ca Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 16 Oct 2004 15:00:40 +0000 Subject: [PATCH] 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 --- src/mac/carbon/window.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/mac/carbon/window.cpp b/src/mac/carbon/window.cpp index 06d75e4611..f33b1a2a3d 100644 --- a/src/mac/carbon/window.cpp +++ b/src/mac/carbon/window.cpp @@ -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() ); -- 2.45.2