summaryrefslogtreecommitdiff
path: root/lib/elements/empty_d_object.py
diff options
context:
space:
mode:
authorKaalleen <reni@allenka.de>2020-05-27 18:39:04 +0200
committerKaalleen <reni@allenka.de>2020-05-27 18:39:04 +0200
commit2f27d6af16952b311bb5d1988ee70afa990c3762 (patch)
treead4e0be083e58acd136cc026f79e1c88a9869c83 /lib/elements/empty_d_object.py
parent455b02847f14983ef8c2463849981f5e9fc44063 (diff)
ignore empty d
Diffstat (limited to 'lib/elements/empty_d_object.py')
-rw-r--r--lib/elements/empty_d_object.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/elements/empty_d_object.py b/lib/elements/empty_d_object.py
new file mode 100644
index 00000000..69a128ad
--- /dev/null
+++ b/lib/elements/empty_d_object.py
@@ -0,0 +1,20 @@
+from ..i18n import _
+from .element import EmbroideryElement
+from .validation import ObjectTypeWarning
+
+
+class EmptyD(ObjectTypeWarning):
+ name = _("Empty D-Attribute")
+ description = _("There is an invalid path object in the document, the d-attribute is missing.")
+ steps_to_solve = [
+ _('* Run Extensions > Ink/Stitch > Troubleshoot > Cleanup Document...')
+ ]
+
+
+class EmptyDObject(EmbroideryElement):
+
+ def validation_warnings(self):
+ yield EmptyD((0, 0))
+
+ def to_patches(self, last_patch):
+ return []