summaryrefslogtreecommitdiff
path: root/lib/output.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/output.py')
-rw-r--r--lib/output.py13
1 files changed, 5 insertions, 8 deletions
diff --git a/lib/output.py b/lib/output.py
index b94d7387..84128a25 100644
--- a/lib/output.py
+++ b/lib/output.py
@@ -32,7 +32,7 @@ def get_flags(stitch):
if stitch.trim:
flags |= libembroidery.TRIM
- if stitch.stop:
+ if stitch.color_change:
flags |= libembroidery.STOP
return flags
@@ -108,13 +108,10 @@ 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 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.
+ if stitch.stop:
+ # This is the start of the extra color block added by the
+ # "STOP after" handler (see stitch_plan/stop.py). Assign it
+ # the same color.
add_thread(pattern, make_thread(color_block.color))
flags = get_flags(stitch)