From 5c413e62cfe6d551d5297fca88721bc8897bb671 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Fri, 20 Jul 2012 20:23:45 +0000 Subject: [PATCH] Call Realize() later in XRC toolbar handler (patch #13888). This is a workaround for a deeper compatibility problem in Cocoa implementation (see the bug for detailed discussion), but for now, this simple workaround is much better than not doing nothing. See #13888. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72164 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/xrc/xh_toolb.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xrc/xh_toolb.cpp b/src/xrc/xh_toolb.cpp index c6e75a3615..2d262ee902 100644 --- a/src/xrc/xh_toolb.cpp +++ b/src/xrc/xh_toolb.cpp @@ -239,8 +239,6 @@ wxObject *wxToolBarXmlHandler::DoCreateResource() m_isInside = false; m_toolbar = NULL; - toolbar->Realize(); - if (m_parentAsWindow && !GetBool(wxT("dontattachtoframe"))) { wxFrame *parentFrame = wxDynamicCast(m_parent, wxFrame); @@ -248,6 +246,8 @@ wxObject *wxToolBarXmlHandler::DoCreateResource() parentFrame->SetToolBar(toolbar); } + toolbar->Realize(); + return toolbar; } } -- 2.45.2