summaryrefslogtreecommitdiff
path: root/lib/extensions
diff options
context:
space:
mode:
authorKaalleen <reni@allenka.de>2021-06-30 16:36:25 +0200
committerKaalleen <reni@allenka.de>2021-06-30 16:36:25 +0200
commita1581202646172707768d24bb5dcba63bd5d4538 (patch)
tree46712f269be355afa802caf1ca08e26e9465a669 /lib/extensions
parent8e229770a5b5d28f68e065f61af3452f7e25c6b5 (diff)
fix selection in selection to pattern
Diffstat (limited to 'lib/extensions')
-rw-r--r--lib/extensions/selection_to_pattern.py7
1 files 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']"