X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/910b005366bf2dbf317284d02ac47c18c2c27ee9..69659fd770f615210efac4b4fa741b3ad6223616:/src/univ/bmpbuttn.cpp diff --git a/src/univ/bmpbuttn.cpp b/src/univ/bmpbuttn.cpp index 0230a0674f..2a9f873ccc 100644 --- a/src/univ/bmpbuttn.cpp +++ b/src/univ/bmpbuttn.cpp @@ -96,14 +96,12 @@ void wxBitmapButton::OnSetBitmap() bool wxBitmapButton::ChangeBitmap(const wxBitmap& bmp) { wxBitmap bitmap = bmp.Ok() ? bmp : m_bmpNormal; - if ( bitmap != m_bitmap ) - { - m_bitmap = bitmap; + if ( bitmap.IsSameAs(m_bitmap) ) + return false; - return true; - } + m_bitmap = bitmap; - return false; + return true; } bool wxBitmapButton::Enable(bool enable)