From: Vadim Zeitlin Date: Mon, 12 Jul 2004 15:48:22 +0000 (+0000) Subject: fixed what looked like a bug in determining the default width in DoGetBestSize() X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/23866d595f47f48356cc63890f80049fb0f1dd43 fixed what looked like a bug in determining the default width in DoGetBestSize() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28213 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/mac/carbon/button.cpp b/src/mac/carbon/button.cpp index 3acf5495cc..b9dee54353 100644 --- a/src/mac/carbon/button.cpp +++ b/src/mac/carbon/button.cpp @@ -99,10 +99,10 @@ wxSize wxButton::DoGetBestSize() const Rect bestsize = { 0 , 0 , 0 , 0 } ; m_peer->GetBestRect( &bestsize ) ; - int wBtn = 0 ; + int wBtn; if ( EmptyRect( &bestsize ) ) { - int wBtn = m_label.Length() * charspace + 12 ; + wBtn = m_label.Length() * charspace + 12 ; } else {