mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 23:23:57 -06:00
Do not add an extruder if it has no position set
Otherwise we get very weird values in the extruders dict Contributes to CURA-3738
This commit is contained in:
parent
63e586ab5b
commit
3b73979a2c
1 changed files with 6 additions and 1 deletions
|
@ -53,7 +53,12 @@ class GlobalStack(CuraContainerStack):
|
|||
if extruder_count and len(self._extruders) + 1 > extruder_count:
|
||||
Logger.log("w", "Adding extruder {meta} to {id} but its extruder count is {count}".format(id = self.id, count = extruder_count, meta = str(extruder.getMetaData())))
|
||||
|
||||
self._extruders[extruder.getMetaDataEntry("position", "0")] = extruder
|
||||
position = extruder.getMetaDataEntry("position")
|
||||
if position is None:
|
||||
Logger.log("w", "No position defined for extruder {extruder}, cannot add it to stack {stack}", extruder = extruder.id, stack = self.id)
|
||||
return
|
||||
|
||||
self._extruders[position] = extruder
|
||||
|
||||
## Overridden from ContainerStack
|
||||
#
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue