diff options
| author | Lex Neva <github.com@lexneva.name> | 2019-08-10 22:22:46 -0400 |
|---|---|---|
| committer | Lex Neva <github.com@lexneva.name> | 2019-08-10 22:22:46 -0400 |
| commit | dafc3b97822ac0e929655bfa73590209e3350c47 (patch) | |
| tree | 3c2e1490a2b4a38e0c0b02682b76c0b50de2e383 /lib/svg/rendering.py | |
| parent | 0c9f13d766f89d25cd0d5a078b3bde1503791dd8 (diff) | |
ignore single-point point lists too
Diffstat (limited to 'lib/svg/rendering.py')
| -rw-r--r-- | lib/svg/rendering.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/svg/rendering.py b/lib/svg/rendering.py index 42a603c5..074380a7 100644 --- a/lib/svg/rendering.py +++ b/lib/svg/rendering.py @@ -151,7 +151,7 @@ def color_block_to_point_lists(color_block): point_lists[-1].append(stitch.as_tuple()) # filter out empty point lists - point_lists = [p for p in point_lists if p] + point_lists = [p for p in point_lists if len(p) > 1] return point_lists @@ -169,9 +169,6 @@ def get_correction_transform(svg): def color_block_to_realistic_stitches(color_block, svg, destination): for point_list in color_block_to_point_lists(color_block): - if not point_list: - continue - color = color_block.color.visible_on_white.darker.to_hex_str() start = point_list[0] for point in point_list[1:]: |
