X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8e4c2912462461f9a2133ac39475457d668d1686..edae63b0769fab90e3a64d0e211ae3090b6120c8:/src/msw/bmpbuttn.cpp diff --git a/src/msw/bmpbuttn.cpp b/src/msw/bmpbuttn.cpp index a77672cbfb..217b1aec63 100644 --- a/src/msw/bmpbuttn.cpp +++ b/src/msw/bmpbuttn.cpp @@ -127,7 +127,7 @@ bool wxBitmapButton::Create(wxWindow *parent, const wxBitmap& bitmap, const wxPoint& pos, const wxSize& size, long style, - const wxValidator& wxVALIDATOR_PARAM(validator), + const wxValidator& validator, const wxString& name) { if ( !wxBitmapButtonBase::Create(parent, id, pos, size, style, @@ -136,6 +136,13 @@ bool wxBitmapButton::Create(wxWindow *parent, 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; }