mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 03:46:05 +08: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
@ -53,7 +53,12 @@ class GlobalStack(CuraContainerStack):
|
|||||||
if extruder_count and len(self._extruders) + 1 > extruder_count:
|
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())))
|
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
|
## Overridden from ContainerStack
|
||||||
#
|
#
|
||||||
|
Loading…
x
Reference in New Issue
Block a user