From 1511374f00175f855d9d7ce47c4b334cfabfaa58 Mon Sep 17 00:00:00 2001 From: alvinpenner Date: Wed, 22 Apr 2009 02:24:28 +0000 Subject: [PATCH] fix for LP bug 364585 --- share/extensions/dxf_outlines.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/share/extensions/dxf_outlines.py b/share/extensions/dxf_outlines.py index d146a8c77..6ff0c1a24 100755 --- a/share/extensions/dxf_outlines.py +++ b/share/extensions/dxf_outlines.py @@ -152,7 +152,12 @@ class MyEffect(inkex.Effect): for node in self.document.getroot().xpath(path, namespaces=inkex.NSS): style = node.get('style') start = style.find("stroke:") - rgb = simplestyle.parseColor(style[(start+7):(start+14)]) + if style[start+11] == ';': + rgb = simplestyle.parseColor(style[(start+7):(start+11)]) + elif style[start+14] == ';': + rgb = simplestyle.parseColor(style[(start+7):(start+14)]) + else: + rgb = (0,0,0) hsl = coloreffect.ColorEffect.rgb_to_hsl(coloreffect.ColorEffect(),rgb[0]/255.0,rgb[1]/255.0,rgb[2]/255.0) self.color = 7 # default is black if hsl[2]: -- 2.30.2