X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c37ffc1fef8187cbf3ec2c0efc8ba6ac5aa0e241..120249f602e466e8a47bbb345043cf379552aa3d:/src/xrc/xh_toolb.cpp?ds=sidebyside diff --git a/src/xrc/xh_toolb.cpp b/src/xrc/xh_toolb.cpp index b35ee00b14..40fc9246df 100644 --- a/src/xrc/xh_toolb.cpp +++ b/src/xrc/xh_toolb.cpp @@ -25,6 +25,8 @@ #if wxUSE_TOOLBAR +IMPLEMENT_DYNAMIC_CLASS(wxToolBarXmlHandler, wxXmlResourceHandler) + wxToolBarXmlHandler::wxToolBarXmlHandler() : wxXmlResourceHandler(), m_isInside(FALSE), m_toolbar(NULL) { @@ -146,8 +148,7 @@ wxObject *wxToolBarXmlHandler::DoCreateResource() toolbar->Realize(); - // FIXME: how can I create a toolbar without immediately setting it to the frame? - if (m_parentAsWindow) + if (m_parentAsWindow && !GetBool(wxT("dontattachtoframe"))) { wxFrame *parentFrame = wxDynamicCast(m_parent, wxFrame); if (parentFrame)