summaryrefslogtreecommitdiff
path: root/lib/elements/empty_d_object.py
blob: 69a128ad753eb775d9cf54cf113229c3bf0402c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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 []