summaryrefslogtreecommitdiff
path: root/lib/elements/element.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/elements/element.py')
-rw-r--r--lib/elements/element.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/elements/element.py b/lib/elements/element.py
index f5f774f0..70d49278 100644
--- a/lib/elements/element.py
+++ b/lib/elements/element.py
@@ -9,8 +9,9 @@ from cspsubdiv import cspsubdiv
from ..commands import find_commands
from ..i18n import _
from ..svg import PIXELS_PER_MM, apply_transforms, convert_length, get_doc_size
-from ..svg.tags import (INKSCAPE_LABEL, INKSTITCH_ATTRIBS, SVG_CIRCLE_TAG,
- SVG_ELLIPSE_TAG, SVG_OBJECT_TAGS, SVG_RECT_TAG)
+from ..svg.tags import (EMBROIDERABLE_TAGS, INKSCAPE_LABEL, INKSTITCH_ATTRIBS,
+ SVG_CIRCLE_TAG, SVG_ELLIPSE_TAG, SVG_GROUP_TAG,
+ SVG_OBJECT_TAGS, SVG_RECT_TAG)
from ..utils import cache
from .svg_objects import circle_to_path, ellipse_to_path, rect_to_path
@@ -160,6 +161,9 @@ class EmbroideryElement(object):
@cache
def _get_style_raw(self, style_name):
+ if self.node.tag != SVG_GROUP_TAG and self.node.tag not in EMBROIDERABLE_TAGS:
+ return None
+
style = self.parse_style()
style = style.get(style_name) or self.node.get(style_name)
parent = self.node.getparent()