summaryrefslogtreecommitdiff
path: root/lib/extensions
diff options
context:
space:
mode:
authorKaalleen <reni@allenka.de>2021-07-07 20:07:04 +0200
committerKaalleen <reni@allenka.de>2021-07-07 20:07:04 +0200
commita5d7ffaffd0b73b5848b7d55ea1f571ea94fd5a7 (patch)
tree156651be37a733fa1ca8877ff26b5f8b59552e4c /lib/extensions
parent736e10240a5c8357fac449371f8ac7451b7696b0 (diff)
add or remove stitches (stroke or fill)
Diffstat (limited to 'lib/extensions')
-rw-r--r--lib/extensions/selection_to_pattern.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/extensions/selection_to_pattern.py b/lib/extensions/selection_to_pattern.py
index 52a0404b..41f89a83 100644
--- a/lib/extensions/selection_to_pattern.py
+++ b/lib/extensions/selection_to_pattern.py
@@ -56,7 +56,8 @@ class SelectionToPattern(InkstitchExtension):
defs.append(etree.fromstring(marker))
# attach marker to node
- style = node.get('style', '').split(";")
+ style = node.get('style') or ''
+ style = style.split(";")
style = [i for i in style if not i.startswith('marker-start')]
style.append('marker-start:url(#inkstitch-pattern-marker)')
node.set('style', ";".join(style))