diff options
| author | Kaalleen <36401965+kaalleen@users.noreply.github.com> | 2023-03-07 18:27:28 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-07 18:27:28 +0100 |
| commit | 28eb374bd08f2230c57f6de821c3c8b83b40c0ff (patch) | |
| tree | c3afe66f8dfc16675eeadf4f458120d4d4da3057 /lib/elements | |
| parent | 74157dd1cb9adada35c2079c1e053e0b4b2dec19 (diff) | |
Add extension stroke to lpe satin (#2115)
Diffstat (limited to 'lib/elements')
| -rw-r--r-- | lib/elements/element.py | 3 | ||||
| -rw-r--r-- | lib/elements/stroke.py | 11 |
2 files changed, 12 insertions, 2 deletions
diff --git a/lib/elements/element.py b/lib/elements/element.py index d3b9f07d..51555129 100644 --- a/lib/elements/element.py +++ b/lib/elements/element.py @@ -249,7 +249,8 @@ class EmbroideryElement(object): @property @param('ties', _('Allow 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.'), + 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 8f50690c..9fe6fee1 100644 --- a/lib/elements/stroke.py +++ b/lib/elements/stroke.py @@ -73,6 +73,14 @@ class Stroke(EmbroideryElement): def dashed(self): return self.get_style("stroke-dasharray") is not None + def update_dash(self, to_dash): + if self.dashed == to_dash: + return + if to_dash is False: + del self.node.style['stroke-dasharray'] + else: + self.node.style['stroke-dasharray'] = "1,0.5" + @property @param('stroke_method', _('Method'), @@ -87,7 +95,8 @@ class Stroke(EmbroideryElement): @property @param('manual_stitch', _('Manual stitch placement'), - 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."), + 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)], |
