diff options
Diffstat (limited to 'lib/stitch_plan/stitch_plan.py')
| -rw-r--r-- | lib/stitch_plan/stitch_plan.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/stitch_plan/stitch_plan.py b/lib/stitch_plan/stitch_plan.py index 570a7645..fef7f61d 100644 --- a/lib/stitch_plan/stitch_plan.py +++ b/lib/stitch_plan/stitch_plan.py @@ -39,8 +39,12 @@ def patches_to_stitch_plan(patches, collapse_len=3.0 * PIXELS_PER_MM): color_block.add_stitch(patch.stitches[0].x, patch.stitches[0].y, jump=True) else: - # add a color change - color_block.add_stitch(color_block.last_stitch.x, color_block.last_stitch.y, stop=True) + # add a color change (only if the last stitch wasn't a "STOP after") + if not color_block.last_stitch.stop: + stitch = color_block.last_stitch.copy() + stitch.stop = True + color_block.add_stitch(stitch) + color_block = stitch_plan.new_color_block() color_block.color = patch.color |
