From a1581202646172707768d24bb5dcba63bd5d4538 Mon Sep 17 00:00:00 2001 From: Kaalleen Date: Wed, 30 Jun 2021 16:36:25 +0200 Subject: fix selection in selection to pattern --- lib/extensions/selection_to_pattern.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/extensions/selection_to_pattern.py b/lib/extensions/selection_to_pattern.py index 3527cc5e..52a0404b 100644 --- a/lib/extensions/selection_to_pattern.py +++ b/lib/extensions/selection_to_pattern.py @@ -7,7 +7,7 @@ import inkex from lxml import etree from ..i18n import _ -from ..svg.tags import SVG_DEFS_TAG +from ..svg.tags import EMBROIDERABLE_TAGS, SVG_DEFS_TAG from .base import InkstitchExtension @@ -21,8 +21,9 @@ class SelectionToPattern(InkstitchExtension): inkex.errormsg(_("Please select at least one object to be marked as a pattern.")) return - for pattern in self.svg.selected.values(): - self.set_marker(pattern) + for pattern in self.get_nodes(): + if pattern.tag in EMBROIDERABLE_TAGS: + self.set_marker(pattern) def set_marker(self, node): xpath = ".//marker[@id='inkstitch-pattern-marker']" -- cgit v1.2.3