summaryrefslogtreecommitdiff
path: root/lib/elements/polyline.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/elements/polyline.py')
-rw-r--r--lib/elements/polyline.py21
1 files changed, 19 insertions, 2 deletions
diff --git a/lib/elements/polyline.py b/lib/elements/polyline.py
index 5bfe5022..a9870172 100644
--- a/lib/elements/polyline.py
+++ b/lib/elements/polyline.py
@@ -1,8 +1,22 @@
from shapely import geometry as shgeo
-from .element import EmbroideryElement, Patch
-from ..utils.geometry import Point
+from ..i18n import _
from ..utils import cache
+from ..utils.geometry import Point
+from .element import EmbroideryElement, Patch
+from .validation import ValidationWarning
+
+
+class PolylineWarning(ValidationWarning):
+ name = _("Object is a PolyLine")
+ description = _("This object is an SVG PolyLine. Ink/Stitch can work with this shape, "
+ "but you can't edit it in Inkscape. Convert it to a manual stitch path "
+ "to allow editing.")
+ steps_to_solve = [
+ _("* Select this object."),
+ _("* Do Path > Object to Path."),
+ _('* Optional: Run the Params extension and check the "manual stitch" box.')
+ ]
class Polyline(EmbroideryElement):
@@ -70,6 +84,9 @@ class Polyline(EmbroideryElement):
return stitches
+ def validation_warnings(self):
+ yield PolylineWarning(self.points[0])
+
def to_patches(self, last_patch):
patch = Patch(color=self.color)