diff options
| author | Lex Neva <github.com@lexneva.name> | 2023-02-05 22:33:38 -0500 |
|---|---|---|
| committer | Lex Neva <github.com@lexneva.name> | 2023-02-16 22:56:16 -0500 |
| commit | f6c2aa89197c82cedfb31465fc4b2acffaeb8f25 (patch) | |
| tree | 1123050a6ba7428dbcc8b72bd074161bdb3e014f /lib/elements/satin_column.py | |
| parent | 62b7c0080c90d0cf44ee173db7d1f237e8df538e (diff) | |
add more check_stop_flag() calls
Diffstat (limited to 'lib/elements/satin_column.py')
| -rw-r--r-- | lib/elements/satin_column.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/elements/satin_column.py b/lib/elements/satin_column.py index be614a04..4028ad27 100644 --- a/lib/elements/satin_column.py +++ b/lib/elements/satin_column.py @@ -21,6 +21,7 @@ from ..utils import Point, cache, cut, cut_multiple, prng from ..stitches import running_stitch from .element import EmbroideryElement, param, PIXELS_PER_MM from .validation import ValidationError, ValidationWarning +from ..utils.threading import check_stop_flag class TooFewPathsError(ValidationError): @@ -818,10 +819,12 @@ class SatinColumn(EmbroideryElement): index1 = 0 while index0 < last_index0 and index1 < last_index1: + check_stop_flag() + # Each iteration of this outer loop is one stitch. Keep going # until we fall off the end of the section. - old_center = shgeo.Point(x/2 for x in (pos0 + pos1)) + old_center = shgeo.Point(x / 2 for x in (pos0 + pos1)) while to_travel > 0 and index0 < last_index0 and index1 < last_index1: # In this loop, we inch along each rail a tiny bit per |
