From f9d57f6ea51ea8da186c41b70950b7d87fa2c20b Mon Sep 17 00:00:00 2001 From: Kaalleen <36401965+kaalleen@users.noreply.github.com> Date: Sun, 24 Apr 2022 08:27:42 +0200 Subject: 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 --- lib/stitch_plan/stitch_plan.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'lib/stitch_plan') 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 -- cgit v1.2.3