X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/77ffb5937e89927b621128789401db8921fe580f..1e6eb02501673fc46e5e2fc00b17f243e107cc55:/src/mac/classic/toolbar.cpp diff --git a/src/mac/classic/toolbar.cpp b/src/mac/classic/toolbar.cpp index 5472aecead..15ecb363a9 100644 --- a/src/mac/classic/toolbar.cpp +++ b/src/mac/classic/toolbar.cpp @@ -6,7 +6,7 @@ // Created: 04/01/98 // RCS-ID: $Id$ // Copyright: (c) Stefan Csomor -// Licence: The wxWidgets licence +// Licence: The wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifdef __GNUG__ @@ -377,6 +377,7 @@ bool wxToolBar::Realize() } SetSize(maxWidth, maxHeight); + InvalidateBestSize(); return TRUE; } @@ -400,7 +401,7 @@ void wxToolBar::MacHandleControlClick( WXWidget control , wxInt16 controlpart , wxToolBarTool* tool = (wxToolBarTool*) node->GetData() ; if ( tool->IsButton() ) { - if( tool->GetControlHandle() == control ) + if( (WXWidget) tool->GetControlHandle() == control ) { if ( tool->CanBeToggled() ) { @@ -494,6 +495,7 @@ bool wxToolBar::DoInsertTool(size_t WXUNUSED(pos), { // nothing special to do here - we relayout in Realize() later tool->Attach(this); + InvalidateBestSize(); return TRUE; } @@ -540,6 +542,7 @@ bool wxToolBar::DoDeleteTool(size_t WXUNUSED(pos), wxToolBarToolBase *tool) tool2->SetPosition( pt ) ; } + InvalidateBestSize(); return TRUE ; } @@ -608,7 +611,7 @@ void wxToolBar::OnMouse( wxMouseEvent &event ) wxTheApp->s_lastMouseDown = 0 ; if ( control && controlpart != kControlNoPart ) // otherwise we will get the event twice { - MacHandleControlClick( control , controlpart , false /* not down anymore */ ) ; + MacHandleControlClick( (WXWidget) control , controlpart , false /* not down anymore */ ) ; } } }