From 767ead90813b296de991de497bfe0e2d33c7452e Mon Sep 17 00:00:00 2001 From: Kaalleen <36401965+kaalleen@users.noreply.github.com> Date: Mon, 5 Apr 2021 11:45:57 +0200 Subject: Delete Command Group on Auto-Route and Cut Satin (#1125) --- lib/stitches/auto_satin.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lib/stitches/auto_satin.py') diff --git a/lib/stitches/auto_satin.py b/lib/stitches/auto_satin.py index 795df036..a047ea74 100644 --- a/lib/stitches/auto_satin.py +++ b/lib/stitches/auto_satin.py @@ -628,8 +628,12 @@ def operations_to_elements_and_trims(operations, preserve_order): def remove_original_elements(elements): for element in elements: for command in element.commands: - remove_from_parent(command.connector) - remove_from_parent(command.use) + command_group = command.use.getparent() + if command_group is not None and command_group.get('id').startswith('command_group'): + remove_from_parent(command_group) + else: + remove_from_parent(command.connector) + remove_from_parent(command.use) remove_from_parent(element.node) -- cgit v1.2.3