X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b4bde7a74bac66004e392e9f3b24235efbde8d82..f0ccd2cbfa0b4ac110b81626da5a184b650b1080:/src/msw/bmpbuttn.cpp?ds=sidebyside diff --git a/src/msw/bmpbuttn.cpp b/src/msw/bmpbuttn.cpp index aea2db8f61..217b1aec63 100644 --- a/src/msw/bmpbuttn.cpp +++ b/src/msw/bmpbuttn.cpp @@ -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; }