Commit 2537dc68 authored by suv-lp's avatar suv-lp Committed by Nicolas Dufour

[Bug #1183473] Convert to Dashes does not work with an imported svg.

Fixed bugs:

(bzr r14911)
parent c2ef9117
......@@ -49,9 +49,21 @@ def cspseglength(sp1,sp2, tolerance = 0.001):
class SplitIt(inkex.Effect):
def __init__(self):
self.not_converted = []
def effect(self):
for id, node in self.selected.iteritems():
for _, node in self.selected.iteritems():
if len(self.not_converted):
inkex.errormsg('Total number of objects not converted: {}\n'.format(len(self.not_converted)))
# return list of IDs in case the user needs to find a specific object
def convert2dash(self, node):
if node.tag == inkex.addNS('g', 'svg'):
for child in node:
if node.tag == inkex.addNS('path','svg'):
dashes = []
offset = 0
......@@ -97,7 +109,7 @@ class SplitIt(inkex.Effect):
if node.get(inkex.addNS('type','sodipodi')):
del node.attrib[inkex.addNS('type', 'sodipodi')]
inkex.errormsg(_("The selected object is not a path.\nTry using the procedure Path->Object to Path."))
if __name__ == '__main__':
e = SplitIt()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment