update for migrategroups extension

This commit is contained in:
Mario Voigt 2020-08-13 14:47:06 +02:00
parent d15de8b64a
commit f3678d4c01
2 changed files with 4 additions and 3 deletions

View File

@ -11,6 +11,6 @@
</effects-menu>
</effect>
<script>
<command reldir="extensions" interpreter="python">fablabchemnitz_migrategroups.py</command>
<command location="inx" interpreter="python">fablabchemnitz_migrategroups.py</command>
</script>
</inkscape-extension>

View File

@ -57,6 +57,7 @@ class MigrateGroups(inkex.Effect):
group.getparent().remove(group)
#remove the selected, now empty group (if it's the case)
if len(self.svg.selected) > 0:
if self.svg.selected[0].tag == inkex.addNS('g','svg'):
self.svg.selected[0].getparent().remove(self.svg.selected[0])