diff options
Diffstat (limited to 'lib/extensions/troubleshoot.py')
| -rw-r--r-- | lib/extensions/troubleshoot.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/extensions/troubleshoot.py b/lib/extensions/troubleshoot.py index 180fd751..c69953eb 100644 --- a/lib/extensions/troubleshoot.py +++ b/lib/extensions/troubleshoot.py @@ -46,8 +46,7 @@ class Troubleshoot(InkstitchExtension): self.add_descriptions(problem_types) self.remove_empty_layers() else: - svg = self.document.getroot() - svg.remove(self.troubleshoot_layer) + self.troubleshoot_layer.delete() message = _("All selected shapes are valid! ") message += "\n\n" @@ -120,7 +119,7 @@ class Troubleshoot(InkstitchExtension): # Remove the old layer - they may have used tranfsorms # or moved it into an other group (which could lead to more transforms) # We don't want to deal with it. - layer.getparent().remove(layer) + layer.delete() layer = inkex.Group(attrib={ 'id': '__validation_layer__', @@ -251,4 +250,4 @@ class Troubleshoot(InkstitchExtension): def remove_empty_layers(self): for layer in self.troubleshoot_layer.iterchildren(SVG_GROUP_TAG): if len(layer) == 0: - self.troubleshoot_layer.remove(layer) + layer.delete() |
