X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2352862a7ee8440fdc2ae65baff31b73e40179d5..33820d94285c0004acce756e7d10d9698e6387d1:/src/osx/bmpbuttn_osx.cpp?ds=sidebyside diff --git a/src/osx/bmpbuttn_osx.cpp b/src/osx/bmpbuttn_osx.cpp index f4c76447f4..d22411f27e 100644 --- a/src/osx/bmpbuttn_osx.cpp +++ b/src/osx/bmpbuttn_osx.cpp @@ -37,7 +37,8 @@ bool wxBitmapButton::Create( wxWindow *parent, { m_macIsUserPane = false; - if ( !wxControl::Create( parent, id, pos, size, style, validator, name ) ) + if ( !wxBitmapButtonBase::Create(parent, id, pos, size, style, + validator, name) ) return false; if ( style & wxBU_AUTODRAW ) @@ -60,11 +61,15 @@ bool wxBitmapButton::Create( wxWindow *parent, return true; } -void wxBitmapButton::SetBitmapLabel( const wxBitmap& bitmap ) +void wxBitmapButton::DoSetBitmap(const wxBitmap& bitmap, State which) { - InvalidateBestSize(); + wxBitmapButtonBase::DoSetBitmap(bitmap, which); - m_peer->SetBitmap( bitmap ); + // we don't support any other states currently + if ( which == State_Normal ) + { + m_peer->SetBitmap( bitmap ); + } } wxSize wxBitmapButton::DoGetBestSize() const