summaryrefslogtreecommitdiff
path: root/lib/stitches/utils
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/utils
parentee14e4e28aed2abcfefe05980f7f35ace8634a1c (diff)
parent.remove -> delete (#3600)
Diffstat (limited to 'lib/stitches/utils')
-rw-r--r--lib/stitches/utils/autoroute.py13
1 files changed, 4 insertions, 9 deletions
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):