summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKaalleen <reni@allenka.de>2023-05-14 09:32:23 +0200
committerKaalleen <reni@allenka.de>2023-05-14 09:32:23 +0200
commit6c46eb2d866f97a1009a20a4446dbc3bdfcbb98a (patch)
treef1d2f7c0436840eddff8f15a5d01b327e0b27a63 /lib
parent6931d4868d05128b4bb148fe1714dedc808591b4 (diff)
ripple: ensure min line count
Diffstat (limited to 'lib')
-rw-r--r--lib/stitches/ripple_stitch.py4
1 files changed, 3 insertions, 1 deletions
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):