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
This commit is contained in:
parent
892a76f771
commit
a2351b3fe4
@ -126,8 +126,11 @@ bool wxButton::Create(wxWindow *parent,
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
SetLabel(label);
|
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);
|
CreateInputHandler(wxINP_HANDLER_BUTTON);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user