summaryrefslogtreecommitdiff
path: root/lib/elements
diff options
context:
space:
mode:
authorRick Levine <rick@xoab.us>2023-03-07 08:02:26 -0800
committerGitHub <noreply@github.com>2023-03-07 17:02:26 +0100
commitca6fc84d4b28903cd4fb0f577d297edc577db29e (patch)
tree98afb4aa9ebf414bbddd7816498f2054bc10bb24 /lib/elements
parent7949a7e302abd9b4bde5dda4824f1a3d35dd770c (diff)
Allow locks, trim, stop on manual stitch placement (#2101)
Co-authored-by: Lex Neva
Diffstat (limited to 'lib/elements')
-rw-r--r--lib/elements/element.py2
-rw-r--r--lib/elements/stroke.py12
2 files changed, 11 insertions, 3 deletions
diff --git a/lib/elements/element.py b/lib/elements/element.py
index ba15d943..759574d3 100644
--- a/lib/elements/element.py
+++ b/lib/elements/element.py
@@ -240,7 +240,7 @@ class EmbroideryElement(object):
@property
@param('ties',
_('Allow lock stitches'),
- tooltip=_('Tie thread at the beginning and/or end of this object. Manual stitch will not add lock stitches.'),
+ tooltip=_('Tie thread at the beginning and/or end of this object. Manual stitch will only add lock stitches if force lock stitched is checked.'),
type='dropdown',
# Ties: 0 = Both | 1 = Before | 2 = After | 3 = Neither
# L10N options to allow lock stitch before and after objects
diff --git a/lib/elements/stroke.py b/lib/elements/stroke.py
index c633a2c6..8f50690c 100644
--- a/lib/elements/stroke.py
+++ b/lib/elements/stroke.py
@@ -87,7 +87,7 @@ class Stroke(EmbroideryElement):
@property
@param('manual_stitch',
_('Manual stitch placement'),
- tooltip=_("Stitch every node in the path. All other options are ignored."),
+ tooltip=_("Stitch every node in the path. All options other than stop and trim are ignored. Lock stitches will be added only if force lock stitches is checked."),
type='boolean',
default=False,
select_items=[('stroke_method', 0)],
@@ -472,7 +472,15 @@ class Stroke(EmbroideryElement):
path = [Point(x, y) for x, y in path]
# manual stitch
if self.manual_stitch_mode:
- patch = StitchGroup(color=self.color, stitches=path, lock_stitches=(None, None))
+ if self.force_lock_stitches:
+ lock_stitches = self.lock_stitches
+ else:
+ # manual stitch disables lock stitches unless they force them
+ lock_stitches = (None, None)
+ patch = StitchGroup(color=self.color,
+ stitches=path,
+ lock_stitches=lock_stitches,
+ force_lock_stitches=self.force_lock_stitches)
# running stitch
elif self.is_running_stitch():
patch = self.running_stitch(path, self.running_stitch_length, self.running_stitch_tolerance)