diff options
Diffstat (limited to 'lib/stitches/utils/autoroute.py')
| -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): |
