diff options
| author | Kaalleen <36401965+kaalleen@users.noreply.github.com> | 2024-05-07 20:48:05 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-07 20:48:05 +0200 |
| commit | 45a8537c98f961742e177e81c4f41db54eec0827 (patch) | |
| tree | b0e5032b160960952d4fbd964362c10c572beccb /lib/update.py | |
| parent | 7edcdfdc47b0c5b76fd633bb331b8786017e8f1c (diff) | |
remove special treatment for polylines (#2866)
Diffstat (limited to 'lib/update.py')
| -rw-r--r-- | lib/update.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/update.py b/lib/update.py index b0bfcdfa..84522934 100644 --- a/lib/update.py +++ b/lib/update.py @@ -6,7 +6,7 @@ from .metadata import InkStitchMetadata from .svg import PIXELS_PER_MM from .svg.tags import EMBROIDERABLE_TAGS, INKSTITCH_ATTRIBS -INKSTITCH_SVG_VERSION = 1 +INKSTITCH_SVG_VERSION = 2 def update_inkstitch_document(svg, selection=None): @@ -67,6 +67,13 @@ def update_legacy_params(element, file_version, inkstitch_svg_version): def _update_to(version, element): if version == 1: _update_to_one(element) + elif version == 2: + _update_to_two(element) + + +def _update_to_two(element): + if element.node.TAG == "polyline" and element.node.style("stroke") is not None: + element.set_param('stroke_method', 'manual_stitch') def _update_to_one(element): # noqa: C901 |
