diff --git a/extensions/fablabchemnitz_migrategroups.inx b/extensions/fablabchemnitz_migrategroups.inx index a2ab7095..6f71587a 100644 --- a/extensions/fablabchemnitz_migrategroups.inx +++ b/extensions/fablabchemnitz_migrategroups.inx @@ -11,6 +11,6 @@ \ No newline at end of file diff --git a/extensions/fablabchemnitz_migrategroups.py b/extensions/fablabchemnitz_migrategroups.py index fe57dbd5..cc5e57f4 100644 --- a/extensions/fablabchemnitz_migrategroups.py +++ b/extensions/fablabchemnitz_migrategroups.py @@ -57,8 +57,9 @@ class MigrateGroups(inkex.Effect): group.getparent().remove(group) #remove the selected, now empty group (if it's the case) - if self.svg.selected[0].tag == inkex.addNS('g','svg'): - self.svg.selected[0].getparent().remove(self.svg.selected[0]) + 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]) #TODO: make newGroup selected now. How ? MigrateGroups().run() \ No newline at end of file