dabo Commit
Revision 4227
Date: 2008-07-04 08:35:01 -0700 (Fri, 04 Jul 2008)
Author: Ed
Trac: http://svn.dabodev.com/trac/dabo/changeset/4227

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

Log:
Added code to convert numerics passed as strings to FontSize into a numeric 
type.


Diff:
Modified: trunk/dabo/ui/uiwx/dFont.py
===================================================================
--- trunk/dabo/ui/uiwx/dFont.py 2008-07-04 13:31:55 UTC (rev 4226)
+++ trunk/dabo/ui/uiwx/dFont.py 2008-07-04 15:35:01 UTC (rev 4227)
@@ -104,6 +104,12 @@
                return multiplier * self._nativeFont.GetPointSize()
 
        def _setSize(self, val):
+               try:
+                       val = int(val)
+               except ValueError:
+                       # Could be fractional. Try casting to float. If that 
fails,
+                       # let the ValueError be raised.
+                       val = float(val)
                if self._useMacFontScaling():
                        self._macNonScaledSize = val
                        val = val / .75




_______________________________________________
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