From: Julian Smart Date: Wed, 25 Oct 2006 09:03:45 +0000 (+0000) Subject: Don't reset the best size to wxDefaultSize unless we have a bitmap, otherwise X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/a2351b3fe410cb1b4ea78276658e22af1c36bfc5?ds=inline Don't reset the best size to wxDefaultSize unless we have a bitmap, otherwise an explicit size is ignored git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42393 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/univ/button.cpp b/src/univ/button.cpp index 39ac1eb1b8..f04966be28 100644 --- a/src/univ/button.cpp +++ b/src/univ/button.cpp @@ -126,8 +126,11 @@ bool wxButton::Create(wxWindow *parent, return false; SetLabel(label); - SetImageLabel(bitmap); - // SetBestSize(size); -- called by SetImageLabel() + + if (bitmap.Ok()) + SetImageLabel(bitmap); // SetBestSize called by SetImageLabel() + else + SetBestSize(size); CreateInputHandler(wxINP_HANDLER_BUTTON);