diff options
| author | Kaalleen <36401965+kaalleen@users.noreply.github.com> | 2025-03-22 06:44:45 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-22 06:44:45 +0100 |
| commit | ee14e4e28aed2abcfefe05980f7f35ace8634a1c (patch) | |
| tree | ef17268ace07a6cff91d1d5c144c005721e8ca04 /lib/stitches/utils | |
| parent | ca74233f2db7ec781a531a0089e93e7453afa146 (diff) | |
auto_satin: remove commands also when a single satin has been routed (and not keep originals is enabled) (#3596)
Diffstat (limited to 'lib/stitches/utils')
| -rw-r--r-- | lib/stitches/utils/autoroute.py | 5 |
1 files changed, 3 insertions, 2 deletions
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): |
