summaryrefslogtreecommitdiff
path: root/lib/stitches
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/stitches
parentee14e4e28aed2abcfefe05980f7f35ace8634a1c (diff)
parent.remove -> delete (#3600)
Diffstat (limited to 'lib/stitches')
-rw-r--r--lib/stitches/auto_satin.py2
-rw-r--r--lib/stitches/utils/autoroute.py13
2 files changed, 5 insertions, 10 deletions
diff --git a/lib/stitches/auto_satin.py b/lib/stitches/auto_satin.py
index 1495891e..cca65d1b 100644
--- a/lib/stitches/auto_satin.py
+++ b/lib/stitches/auto_satin.py
@@ -624,7 +624,7 @@ def add_trims(elements, trim_indices):
just_trimmed = False
for i, element in enumerate(elements):
if just_trimmed and isinstance(element, Stroke):
- element.node.getparent().remove(element.node)
+ element.node.delete()
continue
if i in trim_indices:
diff --git a/lib/stitches/utils/autoroute.py b/lib/stitches/utils/autoroute.py
index 0ae6bd7c..409dec36 100644
--- a/lib/stitches/utils/autoroute.py
+++ b/lib/stitches/utils/autoroute.py
@@ -246,17 +246,12 @@ def remove_original_elements(elements, commands_only=False):
for command in element.commands:
command_group = command.use.getparent()
if command_group is not None and command_group.get('id').startswith('command_group'):
- remove_from_parent(command_group)
+ command_group.delete()
else:
- remove_from_parent(command.connector)
- remove_from_parent(command.use)
+ command.connector.delete()
+ command.use.delete()
if not commands_only:
- remove_from_parent(element.node)
-
-
-def remove_from_parent(node):
- if node.getparent() is not None:
- node.getparent().remove(node)
+ element.node.delete()
def create_new_group(parent, insert_index, label, correction_transform=True):