mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Iterate directly over list in readIndex()
No need for range(len.. and later use of index...
This commit is contained in:
parent
81a34d1d18
commit
e54c859b2d
1 changed files with 3 additions and 3 deletions
|
@ -866,13 +866,13 @@ def readIndex(node, attr):
|
||||||
v = readIntArray(node, attr, [])
|
v = readIntArray(node, attr, [])
|
||||||
chunks = []
|
chunks = []
|
||||||
chunk = []
|
chunk = []
|
||||||
for i in range(len(v)):
|
for i in v:
|
||||||
if v[i] == -1:
|
if i == -1:
|
||||||
if chunk:
|
if chunk:
|
||||||
chunks.append(chunk)
|
chunks.append(chunk)
|
||||||
chunk = []
|
chunk = []
|
||||||
else:
|
else:
|
||||||
chunk.append(v[i])
|
chunk.append(i)
|
||||||
if chunk:
|
if chunk:
|
||||||
chunks.append(chunk)
|
chunks.append(chunk)
|
||||||
return chunks
|
return chunks
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue