summaryrefslogtreecommitdiff
path: root/lib/elements/utils.py
diff options
context:
space:
mode:
authorLex Neva <lexelby@users.noreply.github.com>2020-08-18 14:42:14 -0400
committerGitHub <noreply@github.com>2020-08-18 14:42:14 -0400
commit811f1714d0e20a40c51398df4d186589d07e23ef (patch)
tree273f22662d8e3a76ab949c873f2d1e29d9ff5376 /lib/elements/utils.py
parentb24da295d8e1945a9ea42a6f0c0970932b3aa81a (diff)
parent2f27d6af16952b311bb5d1988ee70afa990c3762 (diff)
Merge pull request #722 from inkstitch/kaalleen/empty-d
Ignore Empty D
Diffstat (limited to 'lib/elements/utils.py')
-rw-r--r--lib/elements/utils.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/elements/utils.py b/lib/elements/utils.py
index c34c4b25..378cec0c 100644
--- a/lib/elements/utils.py
+++ b/lib/elements/utils.py
@@ -1,9 +1,10 @@
from ..commands import is_command
-from ..svg.tags import (EMBROIDERABLE_TAGS, SVG_IMAGE_TAG, SVG_POLYLINE_TAG,
- SVG_TEXT_TAG)
+from ..svg.tags import (EMBROIDERABLE_TAGS, SVG_IMAGE_TAG, SVG_PATH_TAG,
+ SVG_POLYLINE_TAG, SVG_TEXT_TAG)
from .auto_fill import AutoFill
from .clone import Clone, is_clone
from .element import EmbroideryElement
+from .empty_d_object import EmptyDObject
from .fill import Fill
from .image import ImageObject
from .polyline import Polyline
@@ -19,6 +20,9 @@ def node_to_elements(node): # noqa: C901
elif is_clone(node):
return [Clone(node)]
+ elif node.tag == SVG_PATH_TAG and not node.get('d', ''):
+ return [EmptyDObject(node)]
+
elif node.tag in EMBROIDERABLE_TAGS:
element = EmbroideryElement(node)