Skip to content

Commit e23708f

Browse files
authored
Merge pull request #118 from SReich-EMI/patch-2
corrected insert_stitch_relative
2 parents ef3b78b + f1a6903 commit e23708f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pyembroidery/EmbPattern.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ def insert_stitch_relative(self, position, cmd, dx=0, dy=0):
523523
if position < 0:
524524
position += len(self.stitches) # I need positive positions.
525525
if position == 0:
526-
self.stitches.insert(0, [dx, dy, TRIM]) # started (0,0)
526+
self.stitches.insert(0, [dx, dy, cmd]) # started (0,0)
527527
elif (
528528
position == len(self.stitches) or position is None
529529
): # This is properly just an add.
@@ -532,7 +532,7 @@ def insert_stitch_relative(self, position, cmd, dx=0, dy=0):
532532
p = self.stitches[position - 1]
533533
x = p[0] + dx
534534
y = p[1] + dy
535-
self.stitches.insert(position, [x, y, TRIM])
535+
self.stitches.insert(position, [x, y, cmd])
536536

537537
def insert(self, position, cmd, x=0, y=0):
538538
"""Insert a stitch or command"""

0 commit comments

Comments
 (0)