]> git.saurik.com Git - wxWidgets.git/commitdiff
setting a non valid font is permitted, implemented now
authorStefan Csomor <csomor@advancedconcepts.ch>
Fri, 20 Oct 2006 19:29:30 +0000 (19:29 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Fri, 20 Oct 2006 19:29:30 +0000 (19:29 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42177 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/graphcmn.cpp

index 380209a6081eb27b54162a0292aee4bd30f6ff22..100387dcffcd9a16e29a5d1fd7f67e53985ebd02 100644 (file)
@@ -567,7 +567,8 @@ void wxGCDC::SetFont( const wxFont &font )
     if ( m_graphicContext )
        {
                wxFont f = font ;
-               f.SetPointSize( LogicalToDeviceYRel(font.GetPointSize())) ;
+               if ( f.Ok() )
+                       f.SetPointSize( LogicalToDeviceYRel(font.GetPointSize())) ;
         m_graphicContext->SetFont( f );
        }
 }