From ef3e103f85fc0b5712c0a689ae9dae14f6258ffa Mon Sep 17 00:00:00 2001 From: Art Haas Date: Thu, 14 Jun 2007 16:02:08 -0500 Subject: [PATCH] Set LINE_TYPE, LINE_COLOR, and LINE_THICKNESS when setting LINE_STYLE; actually set TEXT_STYLE and the various FONT/TEXT attributes --- PythonCAD/Generic/preferences.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/PythonCAD/Generic/preferences.py b/PythonCAD/Generic/preferences.py index 71d8911..89c0f3d 100644 --- a/PythonCAD/Generic/preferences.py +++ b/PythonCAD/Generic/preferences.py @@ -546,10 +546,18 @@ def _set_text_style(prefmod): if isinstance(_obj, dict): try: _tstyle = _parse_textstyle(_obj) + globals.prefs['TEXT_STYLE'] = _tstyle + globals.prefs['FONT_WEIGHT'] = _tstyle.getWeight() + globals.prefs['FONT_STYLE'] = _tstyle.getStyle() + globals.prefs['FONT_FAMILY'] = _tstyle.getFamily() + globals.prefs['TEXT_SIZE'] = _tstyle.getSize() + globals.prefs['TEXT_ANGLE'] = _tstyle.getAngle() + globals.prefs['TEXT_ALIGNMENT'] = _tstyle.getAlignment() _color = _tstyle.getColor() _colors = globals.prefs['COLORS'] if _color not in _colors: _colors.append(_color) + globals.prefs['FONT_COLOR'] = _color except StandardError, _e: sys.stderr.write("Invalid TextStyle: " + _e + "\n") else: @@ -629,13 +637,16 @@ def _set_line_style(prefmod): _style = _parse_style(_obj) globals.prefs['LINE_STYLE'] = _style _lt = _style.getLinetype() + globals.prefs['LINE_TYPE'] = _lt _lts = globals.prefs['LINETYPES'] if _lt not in _lts: _lts.append(_linetype) _color = _style.getColor() + globals.prefs['LINE_COLOR'] = _color _colors = globals.prefs['COLORS'] if _color not in _colors: _colors.append(_color) + globals.prefs['LINE_THICKNESS'] = _style.getThickness() except StandardError, _e: sys.stderr.write("Invalid Style: " + _e + "\n") else: -- 2.11.4.GIT