From ee14e4e28aed2abcfefe05980f7f35ace8634a1c Mon Sep 17 00:00:00 2001 From: Kaalleen <36401965+kaalleen@users.noreply.github.com> Date: Sat, 22 Mar 2025 06:44:45 +0100 Subject: auto_satin: remove commands also when a single satin has been routed (and not keep originals is enabled) (#3596) --- lib/stitches/utils/autoroute.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/stitches/utils') diff --git a/lib/stitches/utils/autoroute.py b/lib/stitches/utils/autoroute.py index 0e7d11fa..0ae6bd7c 100644 --- a/lib/stitches/utils/autoroute.py +++ b/lib/stitches/utils/autoroute.py @@ -241,7 +241,7 @@ def get_nodes_on_element(graph, element): return nodes -def remove_original_elements(elements): +def remove_original_elements(elements, commands_only=False): for element in elements: for command in element.commands: command_group = command.use.getparent() @@ -250,7 +250,8 @@ def remove_original_elements(elements): else: remove_from_parent(command.connector) remove_from_parent(command.use) - remove_from_parent(element.node) + if not commands_only: + remove_from_parent(element.node) def remove_from_parent(node): -- cgit v1.2.3