summaryrefslogtreecommitdiff
path: root/lib/stitch_plan/stitch_plan.py
diff options
context:
space:
mode:
authorKaalleen <36401965+kaalleen@users.noreply.github.com>2022-04-24 08:27:42 +0200
committerGitHub <noreply@github.com>2022-04-24 08:27:42 +0200
commitf9d57f6ea51ea8da186c41b70950b7d87fa2c20b (patch)
tree7c2664fc201933b64cc224adb28ff717e6f08c61 /lib/stitch_plan/stitch_plan.py
parent4058712139b56a2419e01db700581b3c9554a88a (diff)
Fix lettering scale, etc. (#1620)
* fix lettering scale * adapt to updated inkex: transform operator, selections * fix #1597 * no traceback error message on broken satin columns * highlight troubleshoot "steps to solve" through additional headline * set a minimum value for running stitch repeats * rename "import" thread list to "apply" thread list
Diffstat (limited to 'lib/stitch_plan/stitch_plan.py')
-rw-r--r--lib/stitch_plan/stitch_plan.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/stitch_plan/stitch_plan.py b/lib/stitch_plan/stitch_plan.py
index 74caa54a..4593781a 100644
--- a/lib/stitch_plan/stitch_plan.py
+++ b/lib/stitch_plan/stitch_plan.py
@@ -3,9 +3,14 @@
# Copyright (c) 2010 Authors
# Licensed under the GNU GPL version 3.0 or later. See the file LICENSE for details.
-from .ties import add_ties
-from .color_block import ColorBlock
+from sys import exit
+
+from inkex import errormsg
+
+from ..i18n import _
from ..svg import PIXELS_PER_MM
+from .color_block import ColorBlock
+from .ties import add_ties
def stitch_groups_to_stitch_plan(stitch_groups, collapse_len=None, disable_ties=False): # noqa: C901
@@ -17,6 +22,11 @@ def stitch_groups_to_stitch_plan(stitch_groups, collapse_len=None, disable_ties=
* adds jump-stitches between stitch_group if necessary
"""
+ if not stitch_groups:
+ errormsg(_("There is no selected stitchable element. Please run "
+ "Extensions > Ink/Stitch > Troubleshoot > Troubleshoot objects in case you have expected a stitchout."))
+ exit(1)
+
if collapse_len is None:
collapse_len = 3.0
collapse_len = collapse_len * PIXELS_PER_MM