If a button was initially created with an empty label (but without image
neither), its best size was computed and cached as being null. Correct this by
giving the button the default size instead, as expected.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62970
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
{
wxSize size;
- // account for the text part
- if ( ShowsLabel() )
+ // account for the text part if we have it or if we don't have any image at
+ // all (buttons initially created with empty label should still have a non
+ // zero size)
+ if ( ShowsLabel() || !m_imageData )
{
size = wxMSWButton::ComputeBestSize(const_cast<wxButton *>(this));
}