summaryrefslogtreecommitdiff
path: root/lib/elements/fill_stitch.py
diff options
context:
space:
mode:
authorKaalleen <36401965+kaalleen@users.noreply.github.com>2024-06-20 16:56:00 +0200
committerGitHub <noreply@github.com>2024-06-20 16:56:00 +0200
commitc017cae01aa33a876795ec5da1438e8ec0f11fc5 (patch)
treeace90dd7c09b6bbddd53cf4b351cb55ef56f42c0 /lib/elements/fill_stitch.py
parentc030e3283530bc1d0f4bad219f4c61db22750506 (diff)
gray out randomize stitch length param when random stitch length is disabled (#3002)
Diffstat (limited to 'lib/elements/fill_stitch.py')
-rw-r--r--lib/elements/fill_stitch.py21
1 files changed, 11 insertions, 10 deletions
diff --git a/lib/elements/fill_stitch.py b/lib/elements/fill_stitch.py
index f65c9c2b..188c2ad7 100644
--- a/lib/elements/fill_stitch.py
+++ b/lib/elements/fill_stitch.py
@@ -487,19 +487,20 @@ class FillStitch(EmbroideryElement):
return max(self.get_float_param("running_stitch_tolerance_mm", 0.2), 0.01)
@property
- @param('enable_random_stitches',
- _('Randomize stitches'),
+ @param('enable_random_stitch_length',
+ _('Randomize stitch length'),
tooltip=_('Randomize stitch length and phase instead of dividing evenly or staggering. '
'This is recommended for closely-spaced curved fills to avoid Moiré artefacts.'),
type='boolean',
+ enables=['random_stitch_length_jitter_percent'],
select_items=[('fill_method', 'auto_fill'),
('fill_method', 'contour_fill'),
('fill_method', 'guided_fill'),
('fill_method', 'circular_fill')],
default=False,
sort_index=44)
- def enable_random_stitches(self):
- return self.get_boolean_param('enable_random_stitches', False)
+ def enable_random_stitch_length(self):
+ return self.get_boolean_param('enable_random_stitch_length', False)
@property
@param('random_stitch_length_jitter_percent',
@@ -1023,7 +1024,7 @@ class FillStitch(EmbroideryElement):
ending_point,
self.underpath,
self.gap_fill_rows,
- self.enable_random_stitches,
+ self.enable_random_stitch_length,
self.random_stitch_length_jitter,
self.random_seed,
)
@@ -1049,7 +1050,7 @@ class FillStitch(EmbroideryElement):
self.smoothness,
starting_point,
self.avoid_self_crossing,
- self.enable_random_stitches,
+ self.enable_random_stitch_length,
self.random_stitch_length_jitter,
self.random_seed
)
@@ -1059,7 +1060,7 @@ class FillStitch(EmbroideryElement):
self.max_stitch_length,
self.running_stitch_tolerance,
starting_point,
- self.enable_random_stitches,
+ self.enable_random_stitch_length,
self.random_stitch_length_jitter,
self.random_seed
)
@@ -1069,7 +1070,7 @@ class FillStitch(EmbroideryElement):
self.max_stitch_length,
self.running_stitch_tolerance,
starting_point,
- self.enable_random_stitches,
+ self.enable_random_stitch_length,
self.random_stitch_length_jitter,
self.random_seed
)
@@ -1110,7 +1111,7 @@ class FillStitch(EmbroideryElement):
ending_point,
self.underpath,
self.guided_fill_strategy,
- self.enable_random_stitches,
+ self.enable_random_stitch_length,
self.random_stitch_length_jitter,
self.random_seed,
)
@@ -1164,7 +1165,7 @@ class FillStitch(EmbroideryElement):
ending_point,
self.underpath,
target,
- self.enable_random_stitches,
+ self.enable_random_stitch_length,
self.random_stitch_length_jitter,
self.random_seed,
)