From 41c73a2125c92c533112d4d1afec3abda55c9c3d Mon Sep 17 00:00:00 2001 From: Kaalleen <36401965+kaalleen@users.noreply.github.com> Date: Fri, 29 Mar 2024 11:54:03 +0100 Subject: [PATCH] rename patch -> stitch_group (#2805) --- lib/elements/clone.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/elements/clone.py b/lib/elements/clone.py index 6f667836f..24cdd07be 100644 --- a/lib/elements/clone.py +++ b/lib/elements/clone.py @@ -80,17 +80,17 @@ class Clone(EmbroideryElement): elements.extend(node_to_elements(child, True)) return elements - def to_stitch_groups(self, last_patch=None) -> List[StitchGroup]: + def to_stitch_groups(self, last_stitch_group=None) -> List[StitchGroup]: with self.clone_elements() as elements: - patches = [] + stitch_groups = [] for element in elements: - stitch_groups = element.to_stitch_groups(last_patch) - if len(stitch_groups): - last_patch = stitch_groups[-1] - patches.extend(stitch_groups) + element_stitch_groups = element.to_stitch_groups(last_stitch_group) + if len(element_stitch_groups): + last_stitch_group = element_stitch_groups[-1] + stitch_groups.extend(element_stitch_groups) - return patches + return stitch_groups @contextmanager def clone_elements(self) -> Generator[List[EmbroideryElement], None, None]: