diff options
| author | Kaalleen <36401965+kaalleen@users.noreply.github.com> | 2021-04-05 11:45:57 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-05 11:45:57 +0200 |
| commit | 767ead90813b296de991de497bfe0e2d33c7452e (patch) | |
| tree | 6f11f86241c778db340a52dd8db2e2459df0f9e5 /lib/stitches/auto_satin.py | |
| parent | 22d7aa930555c9f46037463f28bb67456badd920 (diff) | |
Delete Command Group on Auto-Route and Cut Satin (#1125)
Diffstat (limited to 'lib/stitches/auto_satin.py')
| -rw-r--r-- | lib/stitches/auto_satin.py | 8 |
1 files changed, 6 insertions, 2 deletions
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) |
