Code

fix [ 1500602 ] 0.44pre2-1.win32: saving DXF file error
authoracspike <acspike@users.sourceforge.net>
Thu, 8 Jun 2006 02:27:53 +0000 (02:27 +0000)
committeracspike <acspike@users.sourceforge.net>
Thu, 8 Jun 2006 02:27:53 +0000 (02:27 +0000)
share/extensions/inkex.py

index 64efdabda1ecb088957ef449f41abf56d54336bd..e1711105751dc02bd8dd18cc7944f0066c746a76 100755 (executable)
@@ -94,9 +94,9 @@ class Effect:
         layerattr = xml.xpath.Evaluate('//sodipodi:namedview/@inkscape:current-layer',self.document,context=ctx)
         if layerattr:
             layername = layerattr[0].value
-            layer = xml.xpath.Evaluate('//g[@id="%s"]' % layername,self.document,context=ctx)[0]
+            layer = xml.xpath.Evaluate('//g[@id="%s"]' % layername,self.document,context=ctx)
             if layer:
-                self.current_layer = layer
+                self.current_layer = layer[0]
 
         xattr = xml.xpath.Evaluate('//sodipodi:namedview/@inkscape:cx',self.document,context=ctx)
         yattr = xml.xpath.Evaluate('//sodipodi:namedview/@inkscape:cy',self.document,context=ctx)