diff options
| author | Lex Neva <github.com@lexneva.name> | 2018-04-01 15:40:51 -0400 |
|---|---|---|
| committer | Lex Neva <github.com@lexneva.name> | 2018-04-01 15:40:51 -0400 |
| commit | e154a9022569506af8546298b06adaa31b527a8a (patch) | |
| tree | 8935f4fa8f1bfa80d02346a5403fef1b68250c07 | |
| parent | cd1f5b71d78b5c3ed65777c316e871aa258d2f3a (diff) | |
fix thread handling with 'STOP after'
| -rw-r--r-- | inkstitch/__init__.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/inkstitch/__init__.py b/inkstitch/__init__.py index e72a59b5..2e7a55f6 100644 --- a/inkstitch/__init__.py +++ b/inkstitch/__init__.py @@ -274,12 +274,13 @@ def write_embroidery_file(file_path, stitch_plan, svg): add_thread(pattern, make_thread(color_block.color)) for stitch in color_block: - if stitch.stop: - # The user specified "STOP after". "STOP" is the same thing as - # a color change, and the user will assign a special color at - # the machine that tells it to pause after. We need to add - # another copy of the same color here so that the stitches after - # the STOP are still the same color. + if stitch.stop and stitch is not color_block.last_stitch: + # A STOP stitch that is not at the end of a color block + # occurs when the user specified "STOP after". "STOP" is the + # same thing as a color change, and the user will assign a + # special color at the machine that tells it to pause after. + # We need to add another copy of the same color here so that + # the stitches after the STOP are still the same color. add_thread(pattern, make_thread(color_block.color)) flags = get_flags(stitch) |
