From: Václav Slavík Date: Fri, 20 Jul 2012 20:23:45 +0000 (+0000) Subject: Call Realize() later in XRC toolbar handler (patch #13888). X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/5c413e62cfe6d551d5297fca88721bc8897bb671 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 --- 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; } }