On Tue, Jun 12, 2007 at 07:48:50AM -0400, Ed Richley wrote:
>
> Also, there seems to be a problem with edit->preferences, for when I try
> to edit the primary dim units I get the error:
>
> Traceback (most recent call last):
> File
> "/usr/lib/python2.4/site-packages/PythonCAD/Interface/Gtk/gtkmenus.py",
> line 458, in prefs_cb
> gtkprefs.prefs_dialog(gtkimage)
> File
> "/usr/lib/python2.4/site-packages/PythonCAD/Interface/Gtk/gtkprefs.py",
> line 2719, in prefs_dialog
> preferences.save_user_prefs()
> File "/usr/lib/python2.4/site-packages/PythonCAD/Generic/preferences.py",
> line 1660, in save_user_prefs
> _save_dimstyle_values(_f)
> File "/usr/lib/python2.4/site-packages/PythonCAD/Generic/preferences.py",
> line 1471, in _save_dimstyle_values
> if abs(_val - _ds.getOption('DIM_EXTENSION')) > 1e-10:
> TypeError: unsupported operand type(s) for -: 'Color' and 'float'
>
>
> It appears that the DIM_EXTENSION attribute if getting the value of the
> DIM_COLOR.
Grrrrrr .... dumb paste-o.
Index: PythonCAD/Interface/Gtk/gtkprefs.py
===================================================================
--- PythonCAD/Interface/Gtk/gtkprefs.py (revision 2763)
+++ PythonCAD/Interface/Gtk/gtkprefs.py (revision 2764)
@@ -2205,8 +2205,7 @@
else:
raise TypeError, "Unexpected widget for DIM_COLOR: " + `type(_widget)`
_r, _g, _b = _get_rgb_values(_color)
- _dimcolor = get_color(_r, _g, _b)
- globals.prefs['DIM_EXTENSION'] = get_color(_r, _g, _b)
+ globals.prefs['DIM_COLOR'] = get_color(_r, _g, _b)
def _set_background_color(prefstate):
_widget = prefstate.getWidget('BACKGROUND_COLOR')
--
Man once surrendering his reason, has no remaining guard against absurdities
the most monstrous, and like a ship without rudder, is the sport of every wind.
-Thomas Jefferson to James Smith, 1822
_______________________________________________
PythonCAD mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pythoncad