Moved viewbox extension to legacy tools

This commit is contained in:
leyghisbb 2020-08-30 11:19:03 +02:00
parent 6ba341e3d1
commit adbdc6d218
2 changed files with 15 additions and 15 deletions

View File

@ -6,7 +6,7 @@
<object-type>rect</object-type>
<effects-menu>
<submenu name="FabLab Chemnitz">
<submenu name="Various"/>
<submenu name="Legacy Tools"/>
</submenu>
</effects-menu>
</effect>

View File

@ -34,7 +34,7 @@ class SetViewBoxEffect(inkex.Effect):
def effect(self):
if len(self.svg.selected) != 1:
sys.exit("Error: You must select exactly one rectangle")
elif self.svg.selected[0].tag != inkex.addNS('rect','svg'):
if list(self.svg.selected.items())[0][1].tag != inkex.addNS('rect','svg'):
sys.exit("Error: You must select exactly one rectangle")
sel = None