summaryrefslogtreecommitdiff
path: root/lib/stitch_plan/ties.py
diff options
context:
space:
mode:
authorLex Neva <github.com@lexneva.name>2018-05-28 22:15:07 -0400
committerLex Neva <github.com@lexneva.name>2018-05-28 22:39:59 -0400
commitf0c8c6a27b2ea2688bceaea0b86e1c182dee39c9 (patch)
treebf97c0e78cf79ee5cd0672f84e2fcc081e13a399 /lib/stitch_plan/ties.py
parent49b8c9f00b589ec4f2bac02a17b8d58583903e27 (diff)
don't do ties around the fake color change of a "STOP after"
Diffstat (limited to 'lib/stitch_plan/ties.py')
-rw-r--r--lib/stitch_plan/ties.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/stitch_plan/ties.py b/lib/stitch_plan/ties.py
index f9c5b721..6d07ac71 100644
--- a/lib/stitch_plan/ties.py
+++ b/lib/stitch_plan/ties.py
@@ -34,7 +34,9 @@ def add_ties(stitch_plan):
need_tie_in = True
new_stitches = []
for i, stitch in enumerate(color_block.stitches):
- is_special = stitch.trim or stitch.jump or stitch.stop
+ # Tie before and after TRIMs, JUMPs, and color changes, but ignore
+ # the fake color change introduced by a "STOP after" (see stop.py).
+ is_special = stitch.trim or stitch.jump or (stitch.color_change and not stitch.stop)
if is_special and not need_tie_in:
add_tie_off(new_stitches)