After the recent changes we could try to use an invalid bitmap in wxMSW toggle
button code as GetNormalState() could return State_Pressed and then we used
the bitmap for the pressed state unconditionally even if it wasn't set.
It seems more correct to always fall back to the normal bitmap as the pressed
state is already taken into account by GetButtonState().
This fixes unit test failures under MSW after the button classes refactoring.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67946
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
{
wxBitmap bmp = m_imageData->GetBitmap(GetButtonState(this, state));
if ( !bmp.IsOk() )
- bmp = m_imageData->GetBitmap(GetNormalState());
+ bmp = m_imageData->GetBitmap(State_Normal);
const wxSize sizeBmp = bmp.GetSize();
const wxSize margin = m_imageData->GetBitmapMargins();