diff --git a/lib/extensions/cut_satin.py b/lib/extensions/cut_satin.py index b471239ec..fcd1ca065 100644 --- a/lib/extensions/cut_satin.py +++ b/lib/extensions/cut_satin.py @@ -31,8 +31,12 @@ class CutSatin(InkstitchExtension): 'Please use the "Attach commands" extension and attach the "Satin Column cut point" command first.')) split_point = command.target_point - command.use.getparent().remove(command.use) - command.connector.getparent().remove(command.connector) + command_group = command.use.getparent() + if command_group is not None and command_group.get('id').startswith('command_group'): + command_group.getparent().remove(command_group) + else: + command.use.getparent().remove(command.use) + command.connector.getparent().remove(command.connector) new_satins = satin.split(split_point) transform = get_correction_transform(satin.node) diff --git a/lib/stitches/auto_satin.py b/lib/stitches/auto_satin.py index 795df036c..a047ea748 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)