#1084: dPemMixin.draw() without fontFace set gives a wx errors
--------------------+-------------------------------------------------------
 Reporter:  paul    |       Owner:  somebody
     Type:  defect  |      Status:  new     
 Priority:  major   |   Milestone:  0.9     
Component:  ui      |     Version:          
 Keywords:          |  
--------------------+-------------------------------------------------------
 Originally reported by Simen Haugen on dabo-dev:
 http://leafe.com/archives/byMID/dabo-
 dev/[EMAIL PROTECTED]

 {{{
 The errors comes when trying fnt.GetFaceName() when no fontFace is set.

 Here's a hackish fix:

 --- \temp\dabo\dabo\dabo\ui\uiwx\dPemMixin.py   2007-07-02
 18:10:40.489001500 +0200
 +++ dPemMixin.py        2007-07-11 16:29:42.735976200 +0200
 @@ -2717,10 +2717,13 @@
                         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:
 +                       if not self.FontFace:
                                 fnt =
 wx.SystemSettings_GetFont(wx.SYS_DEFAULT_GUI_FONT)
 +                       else:
 +                               try:
 +                                       fnt.GetFaceName()
 +                               except:
 +                                       fnt =
 wx.SystemSettings_GetFont(wx.SYS_DEFAULT_GUI_FONT)
                         if self._fontFace is not None:
                                 fnt.SetFaceName(self._fontFace)
                         if self._fontSize is not None:
 }}}

-- 
Ticket URL: <http://svn.dabodev.com/trac/dabo/ticket/1084>
Dabo <http://svn.dabodev.com/trac/dabo>
Trac Page for Dabo


_______________________________________________
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/dabo-dev/[EMAIL PROTECTED]

Reply via email to