From 6c46eb2d866f97a1009a20a4446dbc3bdfcbb98a Mon Sep 17 00:00:00 2001 From: Kaalleen Date: Sun, 14 May 2023 09:32:23 +0200 Subject: ripple: ensure min line count --- lib/stitches/ripple_stitch.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/stitches/ripple_stitch.py') diff --git a/lib/stitches/ripple_stitch.py b/lib/stitches/ripple_stitch.py index 80800b04..40a522eb 100644 --- a/lib/stitches/ripple_stitch.py +++ b/lib/stitches/ripple_stitch.py @@ -124,10 +124,12 @@ def _line_count_adjust(stroke, num_lines): # So that the end point stays the same even if the design is resized. This is necessary to enable # the user to carefully plan the output and and connect the end point to the following object num_lines -= 1 + # ensure minimum line count + num_lines = max(1, num_lines) if stroke.is_closed or stroke.join_style == 1: # for flat join styles we need to add an other line num_lines += 1 - return max(1, num_lines) + return num_lines def _get_helper_lines(stroke): -- cgit v1.2.3