Removed deprecations from dots2pathpoints

This commit is contained in:
leyghisbb 2020-08-30 11:51:54 +02:00
parent 3e19afedd2
commit 8a9df3ab5e

View File

@ -33,17 +33,16 @@ class Pathpoints2Dots(inkex.Effect):
def effect(self):
if len(self.svg.selected) != 2:
errormsg("Please select exact two objects:\n1. object representing path,\n2. object representing dots.")
inkex.errormsg("Please select exact two objects:\n1. object representing path,\n2. object representing dots.")
return
dot = self.svg.selected[0]
iddot = dot.get('id')
path = self.svg.selected[1]
idpath = path.get('id')
nodes = list(self.svg.selected.items())
iddot = nodes[0][0]
idpath = nodes[1][0]
dot = self.svg.selected[iddot]
path = self.svg.selected[idpath]
self.svg.selected.popitem()
self.svg.selected.popitem()
bb = dot.bounding_box()
parent = path.find('..')
group = inkex.Group()
@ -72,4 +71,4 @@ class Pathpoints2Dots(inkex.Effect):
clone.set('y',point.y-bb.center.y)
group.add(clone)
Pathpoints2Dots().run()
Pathpoints2Dots().run()