This was broken during wxButton/wxBitmapButton merge and wxBitmapButton was
not created with the correct initial size if the default size was specified
when creating it any longer. Fix this by calling SetInitialSize() once again
after setting the bitmap.
See #12323.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65236
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
- Fix Cygwin 1.7 build (David Gangola).
- Allow using wxDC::DrawText() with multiline texts.
+- Fix wxBitmapButton best size determination broken in 2.9.1.
All (GUI):
SetBitmapLabel(bitmap);
+ if ( !size.IsFullySpecified() )
+ {
+ // As our bitmap has just changed, our best size has changed as well so
+ // reset the initial size using the new value.
+ SetInitialSize(size);
+ }
+
return true;
}