Fix stop command (#1841)

pull/1863/head
Kaalleen 2022-10-15 16:40:10 +02:00 zatwierdzone przez GitHub
rodzic 10a800531a
commit 19f973a44a
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 6 dodań i 3 usunięć

Wyświetl plik

@ -40,6 +40,9 @@ def stitch_groups_to_stitch_plan(stitch_groups, collapse_len=None, min_stitch_le
if color_block.color != stitch_group.color:
if len(color_block) == 0:
# We just processed a stop, which created a new color block.
# end the previous block with a color change
stitch_plan.color_blocks[-2].add_stitch(color_change=True)
# We'll just claim this new block as ours:
color_block.color = stitch_group.color
else:

Wyświetl plik

@ -66,7 +66,7 @@ class ThreadColor(object):
return hash(self.rgb)
def __ne__(self, other):
return not(self == other)
return not (self == other)
def __repr__(self):
return "ThreadColor" + repr(self.rgb)