mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-15 10:47:49 -06:00
Turn GlobalStack's extruders property into a dict
We do not load the extruders in a fixed order, thus we cannot assume that addExtruder is called in the right order. This means that index 0 of the extruders is not necessarily the extruder with position 0. So instead, use the extruder position as a dict key. Contributes to CURA-3738
This commit is contained in:
parent
9686df285d
commit
a7bf205dbc
2 changed files with 7 additions and 7 deletions
|
@ -64,7 +64,7 @@ class ExtruderStack(CuraContainerStack):
|
|||
|
||||
limit_to_extruder = super().getProperty(key, "limit_to_extruder")
|
||||
if (limit_to_extruder is not None and limit_to_extruder != "-1") and self.getMetaDataEntry("position") != str(limit_to_extruder):
|
||||
result = self.getNextStack().extruders[int(limit_to_extruder)].getProperty(key, property_name)
|
||||
result = self.getNextStack().extruders[str(limit_to_extruder)].getProperty(key, property_name)
|
||||
if result is not None:
|
||||
return result
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue