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
This commit is contained in:
Václav Slavík
2012-07-20 20:23:45 +00:00
parent 1582a1db62
commit 5c413e62cf

View File

@@ -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;
}
}