summaryrefslogtreecommitdiff
path: root/lib/elements
diff options
context:
space:
mode:
Diffstat (limited to 'lib/elements')
-rw-r--r--lib/elements/element.py3
-rw-r--r--lib/elements/stroke.py11
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)],