]> git.saurik.com Git - wxWidgets.git/commitdiff
adapting to new m_font handling in base (it's not always valid, so use GetFont())
authorStefan Csomor <csomor@advancedconcepts.ch>
Tue, 13 May 2008 20:52:56 +0000 (20:52 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Tue, 13 May 2008 20:52:56 +0000 (20:52 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53588 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/window.cpp

index 804c0c2650843d499da6f73d84260baa62f767c2..aa9503fb3b78b666319df01438c84b5cbcaba42d 100644 (file)
@@ -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 ;