dabo Commit
Revision 5113
Date: 2009-03-06 07:07:54 -0800 (Fri, 06 Mar 2009)
Author: Nate
Trac: http://trac.dabodev.com/changeset/5113

Changed:
U   trunk/dabo/ui/uiwx/dPemMixin.py

Log:
This revision fixes ticket #1084.  The sample
application given produces the error for me
even without Wing.  Used Simen's fix with one
minor change in the if structure.

Diff:
Modified: trunk/dabo/ui/uiwx/dPemMixin.py
===================================================================
--- trunk/dabo/ui/uiwx/dPemMixin.py     2009-03-06 14:52:01 UTC (rev 5112)
+++ trunk/dabo/ui/uiwx/dPemMixin.py     2009-03-06 15:07:54 UTC (rev 5113)
@@ -3025,10 +3025,13 @@
                                return
                        fnt = dc.GetFont()
                        # If the following call fails, the font has not been 
initialized, and can look 
-                       # pretty ugly. In this case, initialize it to the 
system-default font.  
-                       try:
-                               fnt.GetFaceName()
-                       except AttributeError:
+                       # pretty ugly. In this case, initialize it to the 
system-default font.
+                       if self.FontFace:
+                               try:
+                                       fnt.GetFaceName()
+                               except AttributeError:
+                                       fnt = 
wx.SystemSettings_GetFont(wx.SYS_DEFAULT_GUI_FONT)
+                       else:
                                fnt = 
wx.SystemSettings_GetFont(wx.SYS_DEFAULT_GUI_FONT)
                        if self._fontFace is not None:
                                fnt.SetFaceName(self._fontFace)



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to