]> git.saurik.com Git - wxWidgets.git/commit
Fall back to the valid normal bitmap if no state-specific bitmap is set.
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 15 Jun 2011 21:31:48 +0000 (21:31 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 15 Jun 2011 21:31:48 +0000 (21:31 +0000)
commit42440b08eadbc14cde1b1f7bffe268c69e5e12be
tree16d92790791b24ac88eb017ce6b6a578e381bd8e
parent8770af492aec443f8016c27ff46cbb01cd2e8357
Fall back to the valid normal bitmap if no state-specific bitmap is set.

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
src/msw/anybutton.cpp