summaryrefslogtreecommitdiff
path: root/lib/extensions/input.py
diff options
context:
space:
mode:
authorMomo <reni@allenka.de>2019-07-07 16:25:21 +0200
committerMomo <reni@allenka.de>2019-07-07 16:25:21 +0200
commit0cd562a4fcfe7ddec45103cf417e14409e378bff (patch)
tree182352d423f193a110fd3d032180e4e5d3b1712f /lib/extensions/input.py
parentfccefb3e0d9cf9a512983e3dbf4927ade1867f81 (diff)
delete empty color block
Diffstat (limited to 'lib/extensions/input.py')
-rw-r--r--lib/extensions/input.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/extensions/input.py b/lib/extensions/input.py
index 53961e91..826e7e04 100644
--- a/lib/extensions/input.py
+++ b/lib/extensions/input.py
@@ -18,8 +18,7 @@ class Input(object):
color_block = None
for raw_stitches, thread in pattern.get_as_colorblocks():
- if len(raw_stitches) > 1:
- color_block = stitch_plan.new_color_block(thread)
+ color_block = stitch_plan.new_color_block(thread)
trim_after = False
for x, y, command in raw_stitches:
if command == pyembroidery.STITCH:
@@ -30,6 +29,8 @@ class Input(object):
if len(color_block) > 0 and command == pyembroidery.TRIM:
trim_after = True
+ stitch_plan.delete_empty_color_block(color_block)
+
extents = stitch_plan.extents
svg = etree.Element("svg", nsmap=inkex.NSS, attrib={
"width": str(extents[0] * 2),