Code

fix up what was left broken after the lxml conversion
authoracspike <acspike@users.sourceforge.net>
Tue, 26 Jun 2007 01:25:38 +0000 (01:25 +0000)
committeracspike <acspike@users.sourceforge.net>
Tue, 26 Jun 2007 01:25:38 +0000 (01:25 +0000)
share/extensions/markers_strokepaint.py

index a6928f5e4f9f59ac0156f6659c5520e64bfbcb0d..cc186eaa2939a8c695a32e425104e724fc8e83a6 100644 (file)
@@ -61,14 +61,15 @@ class MyEffect(inkex.Effect):
                     mnode.set(inkex.addNS('stockid','inkscape'), new_id)\r
                     defs.append(mnode)\r
                     \r
-                    children = self.document.getroot().xpath('/svg:svg//svg:marker[@id="%s"]//*[@style]' % new_id,inkex.NSS)\r
+                    children = mnode.xpath('.//*[@style]',inkex.NSS)\r
                     for child in children:\r
                         cstyle = simplestyle.parseStyle(child.get('style'))\r
                         if ('stroke' in cstyle and cstyle['stroke'] != 'none') or 'stroke' not in cstyle:\r
-                                cstyle['stroke'] = stroke\r
+                            cstyle['stroke'] = stroke\r
                         if ('fill' in cstyle and cstyle['fill'] != 'none') or 'fill' not in cstyle:\r
-                                cstyle['fill'] = stroke\r
+                            cstyle['fill'] = stroke\r
                         child.set('style',simplestyle.formatStyle(cstyle))\r
             node.set('style',simplestyle.formatStyle(style))\r
+\r
 e = MyEffect()\r
 e.affect()\r