for nested repeat loops
This commit is contained in:
@@ -707,6 +707,7 @@ def ps_dict_order(d):
|
||||
'meters': meters,
|
||||
}
|
||||
|
||||
|
||||
sdict2 = collections.OrderedDict(reversed(list(sdict.items())))
|
||||
|
||||
for step in steps:
|
||||
@@ -746,12 +747,25 @@ def ps_dict_order(d):
|
||||
sdict3.append(item)
|
||||
totalmeters += factor*item['meters']
|
||||
totalseconds += factor*item['seconds']
|
||||
if len(holduntil)>0 and item['stepID'] == holduntil[-1]:
|
||||
sdict3.append(hold.pop())
|
||||
factor /= multiplier.pop()
|
||||
spaces = spaces[:-18]
|
||||
holduntil.pop()
|
||||
|
||||
if len(holduntil)>0 and item['stepID'] <= holduntil[-1]:
|
||||
if item['stepID'] == holduntil[-1]:
|
||||
sdict3.append(hold.pop())
|
||||
factor /= multiplier.pop()
|
||||
spaces = spaces[:-18]
|
||||
holduntil.pop()
|
||||
else:
|
||||
prevstep = sdict3.pop()
|
||||
prevstep['string'] = prevstep['string'][18:]
|
||||
prevprevstep = sdict3.pop()
|
||||
prevprevstep['string'] = spaces+prevprevstep['string']
|
||||
sdict3.append(prevprevstep)
|
||||
curstep = hold.pop()
|
||||
curstep['string'] = curstep['string']
|
||||
sdict3.append(curstep)
|
||||
factor /= multiplier.pop()
|
||||
sdict3.append(prevstep)
|
||||
holduntil.pop()
|
||||
spaces = spaces[:-18]
|
||||
|
||||
sdict = list(reversed(sdict3))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user