X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c37ffc1fef8187cbf3ec2c0efc8ba6ac5aa0e241..41e2b43ea4fd82f188cf6f62b71c67bca8844ae9:/contrib/src/xrc/xh_toolb.cpp diff --git a/contrib/src/xrc/xh_toolb.cpp b/contrib/src/xrc/xh_toolb.cpp index b35ee00b14..40fc9246df 100644 --- a/contrib/src/xrc/xh_toolb.cpp +++ b/contrib/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)