cleaned some code

This commit is contained in:
leyghisbb
2021-04-18 18:21:23 +02:00
parent 41663ffd86
commit 313b0c3b63
13 changed files with 368 additions and 367 deletions

View File

@ -384,7 +384,7 @@ class vpypetools (inkex.EffectExtension):
trajectoriesLayer[0].attrib.pop('fill') # remove unneccesary fill attribute
else:
if len(trajectoriesLayer) > 0:
trajectoriesLayer[0].getparent().remove(trajectoriesLayer[0])
trajectoriesLayer[0].delete()
lineLayers = import_doc.getroot().xpath("//svg:g[not(@id='pen_up_trajectories')]", namespaces=inkex.NSS) #all layer except the pen_up trajectories layer
if self.options.use_style_of_first_element is True and self.options.input_handling == "paths" and firstElementStyle is not None:
@ -420,7 +420,7 @@ class vpypetools (inkex.EffectExtension):
# Remove selection objects to do a real replace with new objects from vpype document
if self.options.keep_objects is False:
for node in nodesToWork:
node.getparent().remove(node)
node.delete()
if __name__ == '__main__':
vpypetools().run()