diff options
| author | Lex Neva <lexelby@users.noreply.github.com> | 2020-08-18 14:42:14 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-18 14:42:14 -0400 |
| commit | 811f1714d0e20a40c51398df4d186589d07e23ef (patch) | |
| tree | 273f22662d8e3a76ab949c873f2d1e29d9ff5376 /lib/elements/empty_d_object.py | |
| parent | b24da295d8e1945a9ea42a6f0c0970932b3aa81a (diff) | |
| parent | 2f27d6af16952b311bb5d1988ee70afa990c3762 (diff) | |
Merge pull request #722 from inkstitch/kaalleen/empty-d
Ignore Empty D
Diffstat (limited to 'lib/elements/empty_d_object.py')
| -rw-r--r-- | lib/elements/empty_d_object.py | 20 |
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 [] |
