From: Stefan Csomor Date: Tue, 13 May 2008 20:52:56 +0000 (+0000) Subject: adapting to new m_font handling in base (it's not always valid, so use GetFont()) X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/6662d8c097e847bf4c33061da526577cf1c46f19 adapting to new m_font handling in base (it's not always valid, so use GetFont()) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53588 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/mac/carbon/window.cpp b/src/mac/carbon/window.cpp index 804c0c2650..aa9503fb3b 100644 --- a/src/mac/carbon/window.cpp +++ b/src/mac/carbon/window.cpp @@ -2060,8 +2060,12 @@ void wxWindowMac::GetTextExtent(const wxString& string, int *x, int *y, int *descent, int *externalLeading, const wxFont *theFont ) const { const wxFont *fontToUse = theFont; + wxFont tempFont; if ( !fontToUse ) - fontToUse = &m_font; + { + tempFont = GetFont(); + fontToUse = &tempFont; + } wxClientDC dc( (wxWindowMac*) this ) ; wxCoord lx,ly,ld,le ;