diff options
| author | Kaalleen <reni@allenka.de> | 2023-03-25 19:32:15 +0100 |
|---|---|---|
| committer | Kaalleen <reni@allenka.de> | 2023-03-25 19:47:22 +0100 |
| commit | 9b5fd22a245962e4078f872ecdaa1bb15d5cd844 (patch) | |
| tree | 4a5f3f4f49ea29ea734eff9439c8e04382201a71 /lib/extensions/zigzag_line_to_satin.py | |
| parent | 221ff2a645d453a974160a155af1a047c224d80b (diff) | |
zigzag-to-satin: do not care about the selections stitch type
Diffstat (limited to 'lib/extensions/zigzag_line_to_satin.py')
| -rw-r--r-- | lib/extensions/zigzag_line_to_satin.py | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/lib/extensions/zigzag_line_to_satin.py b/lib/extensions/zigzag_line_to_satin.py index 7e5232a7..fbb32060 100644 --- a/lib/extensions/zigzag_line_to_satin.py +++ b/lib/extensions/zigzag_line_to_satin.py @@ -5,7 +5,6 @@ import inkex -from ..elements import Stroke from ..i18n import _ from .base import InkstitchExtension @@ -25,17 +24,12 @@ class ZigzagLineToSatin(InkstitchExtension): def effect(self): if not self.svg.selection or not self.get_elements(): - inkex.errormsg(_("Please select at least one stroke.")) - return - - if not any(isinstance(item, Stroke) for item in self.elements): - # L10N: Convert To Satin extension, user selected one or more objects that were not lines. inkex.errormsg(_("Please select at least one stroke to convert to a satin column.")) return - for element in self.elements: + for node in self.svg.selection: d = [] - point_list = list(element.node.get_path().end_points) + point_list = list(node.get_path().end_points) rails, rungs = self._get_rails_and_rungs(point_list) if self.options.rungs: @@ -48,8 +42,8 @@ class ZigzagLineToSatin(InkstitchExtension): else: d.append(self._smooth_path(rails)) - element.node.set('d', " ".join(d)) - element.set_param('satin_column', True) + node.set('d', " ".join(d)) + node.set('inkstitch:satin_column', True) def _get_rails_and_rungs(self, point_list): if self.options.pattern == "sawtooth": |
