summaryrefslogtreecommitdiff
path: root/lib/extensions/troubleshoot.py
diff options
context:
space:
mode:
authorKaalleen <36401965+kaalleen@users.noreply.github.com>2025-03-22 17:43:50 +0100
committerGitHub <noreply@github.com>2025-03-22 17:43:50 +0100
commit40405edfe1ab9735e33fd705b090dc467983611f (patch)
tree1c475c7ab627a9959327fef8cba69815a5739397 /lib/extensions/troubleshoot.py
parentee14e4e28aed2abcfefe05980f7f35ace8634a1c (diff)
parent.remove -> delete (#3600)
Diffstat (limited to 'lib/extensions/troubleshoot.py')
-rw-r--r--lib/extensions/troubleshoot.py7
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()