summaryrefslogtreecommitdiff
path: root/lib/stitch_plan/ties.py
diff options
context:
space:
mode:
authorKaalleen <36401965+kaalleen@users.noreply.github.com>2021-03-14 09:38:36 +0100
committerGitHub <noreply@github.com>2021-03-14 09:38:36 +0100
commit21614c7c3ae46fbfa229755916aec433faba0c95 (patch)
tree8a676049b49ba83890f320ab219b7b96aedc9aac /lib/stitch_plan/ties.py
parent3dd767917d8e604bf4a1f3b41c5c4fc506fa2b96 (diff)
add lock stitches select box (#1076)
Co-authored-by: Lex Neva <github.com@lexneva.name>
Diffstat (limited to 'lib/stitch_plan/ties.py')
-rw-r--r--lib/stitch_plan/ties.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/stitch_plan/ties.py b/lib/stitch_plan/ties.py
index 5acf16e6..916f9822 100644
--- a/lib/stitch_plan/ties.py
+++ b/lib/stitch_plan/ties.py
@@ -31,11 +31,14 @@ def add_tie(stitches, tie_path):
def add_tie_off(stitches):
- add_tie(stitches, stitches[-1:-3:-1])
+ # tie_modus: 0 = both | 1 = before | 2 = after | 3 = neither
+ if stitches[0].tie_modus not in [1, 3]:
+ add_tie(stitches, stitches[-1:-3:-1])
def add_tie_in(stitches, upcoming_stitches):
- add_tie(stitches, upcoming_stitches)
+ if stitches[0].tie_modus not in [2, 3]:
+ add_tie(stitches, upcoming_stitches)
def add_ties(stitch_plan):