X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/03647350fc7cd141953c72e0284e928847d30f44..48d43515c24e7f3032a7119179da4eddaf4c1ed4:/src/osx/carbon/stattext.cpp diff --git a/src/osx/carbon/stattext.cpp b/src/osx/carbon/stattext.cpp index 90765430e8..67be74dbb4 100644 --- a/src/osx/carbon/stattext.cpp +++ b/src/osx/carbon/stattext.cpp @@ -48,10 +48,11 @@ wxSize wxStaticText::DoGetBestSize() const Rect bestsize = { 0 , 0 , 0 , 0 } ; // try the built-in best size if available - Boolean former = m_peer->GetData( kControlStaticTextIsMultilineTag); - m_peer->SetData( kControlStaticTextIsMultilineTag, (Boolean)0 ); - m_peer->GetBestRect( &bestsize ) ; - m_peer->SetData( kControlStaticTextIsMultilineTag, former ); + Boolean former = GetPeer()->GetData( kControlStaticTextIsMultilineTag); + GetPeer()->SetData( kControlStaticTextIsMultilineTag, (Boolean)0 ); + GetPeer()->GetBestRect( &bestsize ) ; + GetPeer()->SetData( kControlStaticTextIsMultilineTag, former ); + if ( !EmptyRect( &bestsize ) ) { bounds.h = bestsize.right - bestsize.left ; @@ -62,7 +63,7 @@ wxSize wxStaticText::DoGetBestSize() const { #if wxOSX_USE_CARBON ControlFontStyleRec controlFont; - OSStatus err = m_peer->GetData( kControlEntireControl, kControlFontStyleTag, &controlFont ); + OSStatus err = GetPeer()->GetData( kControlEntireControl, kControlFontStyleTag, &controlFont ); verify_noerr( err ); #if wxOSX_USE_ATSU_TEXT