X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/03647350fc7cd141953c72e0284e928847d30f44..71a09c3579dd5cb4cd8fa7fdc143561cbff74e12:/src/osx/carbon/stattext.cpp diff --git a/src/osx/carbon/stattext.cpp b/src/osx/carbon/stattext.cpp index 90765430e8..8b0c9714c4 100644 --- a/src/osx/carbon/stattext.cpp +++ b/src/osx/carbon/stattext.cpp @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 04/01/98 -// RCS-ID: $Id$ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -48,10 +47,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 +62,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