X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c37ffc1fef8187cbf3ec2c0efc8ba6ac5aa0e241..70e45c91bb677a3fe7eb8152f3c89c08cb0b2496:/src/xrc/xh_toolb.cpp 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)