diff options
Diffstat (limited to 'lib/stitch_plan/stitch_plan.py')
| -rw-r--r-- | lib/stitch_plan/stitch_plan.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/stitch_plan/stitch_plan.py b/lib/stitch_plan/stitch_plan.py index 0038a106..25571578 100644 --- a/lib/stitch_plan/stitch_plan.py +++ b/lib/stitch_plan/stitch_plan.py @@ -45,10 +45,11 @@ def stitch_groups_to_stitch_plan(stitch_groups, collapse_len=None, min_stitch_le if color_block.color != stitch_group.color: # add a lock stitch to the last element of the previous group - lock_stitches = previous_stitch_group.get_lock_stitches("end", disable_ties) - if lock_stitches: - color_block.add_stitches(stitches=lock_stitches) - need_tie_in = True + if not need_tie_in: + lock_stitches = previous_stitch_group.get_lock_stitches("end", disable_ties) + if lock_stitches: + color_block.add_stitches(stitches=lock_stitches) + need_tie_in = True # end the previous block with a color change color_block.add_stitch(color_change=True) |
