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:
@@ -239,8 +239,6 @@ wxObject *wxToolBarXmlHandler::DoCreateResource()
|
|||||||
m_isInside = false;
|
m_isInside = false;
|
||||||
m_toolbar = NULL;
|
m_toolbar = NULL;
|
||||||
|
|
||||||
toolbar->Realize();
|
|
||||||
|
|
||||||
if (m_parentAsWindow && !GetBool(wxT("dontattachtoframe")))
|
if (m_parentAsWindow && !GetBool(wxT("dontattachtoframe")))
|
||||||
{
|
{
|
||||||
wxFrame *parentFrame = wxDynamicCast(m_parent, wxFrame);
|
wxFrame *parentFrame = wxDynamicCast(m_parent, wxFrame);
|
||||||
@@ -248,6 +246,8 @@ wxObject *wxToolBarXmlHandler::DoCreateResource()
|
|||||||
parentFrame->SetToolBar(toolbar);
|
parentFrame->SetToolBar(toolbar);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
toolbar->Realize();
|
||||||
|
|
||||||
return toolbar;
|
return toolbar;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user