As of src/common/framecmn.cpp revision 1.60 the wxFrameBase::CreateToolBar
method now uses SetToolBar rather than updating m_frameToolBar directly. Therefore, we no longer need to duplicate the code from SetToolBar in CreateToolBar. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35653 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -179,6 +179,8 @@ void wxFrame::UpdateFrameNSView()
|
|||||||
if(m_frameToolBar)
|
if(m_frameToolBar)
|
||||||
{
|
{
|
||||||
NSView *tbarNSView = m_frameToolBar->GetNSViewForSuperview();
|
NSView *tbarNSView = m_frameToolBar->GetNSViewForSuperview();
|
||||||
|
// If the toolbar doesn't have a superview then set it to our
|
||||||
|
// content view.
|
||||||
if(![tbarNSView superview])
|
if(![tbarNSView superview])
|
||||||
[m_frameNSView addSubview: tbarNSView];
|
[m_frameNSView addSubview: tbarNSView];
|
||||||
// Do this after addSubView so that SetSize can work
|
// Do this after addSubView so that SetSize can work
|
||||||
@@ -278,14 +280,7 @@ wxToolBar* wxFrame::CreateToolBar(long style,
|
|||||||
const wxString& name)
|
const wxString& name)
|
||||||
{
|
{
|
||||||
wxAutoNSAutoreleasePool pool;
|
wxAutoNSAutoreleasePool pool;
|
||||||
wxFrameBase::CreateToolBar(style,winid,name);
|
return wxFrameBase::CreateToolBar(style,winid,name);
|
||||||
if(m_frameToolBar)
|
|
||||||
{
|
|
||||||
m_frameToolBar->CocoaRemoveFromParent();
|
|
||||||
m_frameToolBar->SetOwningFrame(this);
|
|
||||||
}
|
|
||||||
UpdateFrameNSView();
|
|
||||||
return m_frameToolBar;
|
|
||||||
}
|
}
|
||||||
#endif // wxUSE_TOOLBAR
|
#endif // wxUSE_TOOLBAR
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user