mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-20 19:29:09 +08:00
Fix materials models
This commit is contained in:
parent
97059daf6a
commit
844a597e08
@ -73,6 +73,10 @@ class BrandMaterialsModel(ListModel):
|
||||
if global_stack is None:
|
||||
self.setItems([])
|
||||
return
|
||||
extruder_position = str(self._extruder_position)
|
||||
if extruder_position not in global_stack.extruders:
|
||||
self.setItems([])
|
||||
return
|
||||
extruder_stack = global_stack.extruders[str(self._extruder_position)]
|
||||
|
||||
available_material_dict = self._material_manager.getAvailableMaterialsForMachineExtruder(global_stack,
|
||||
|
@ -25,7 +25,11 @@ class GenericMaterialsModel(BaseMaterialsModel):
|
||||
if global_stack is None:
|
||||
self.setItems([])
|
||||
return
|
||||
extruder_stack = global_stack.extruders[str(self._extruder_position)]
|
||||
extruder_position = str(self._extruder_position)
|
||||
if extruder_position not in global_stack.extruders:
|
||||
self.setItems([])
|
||||
return
|
||||
extruder_stack = global_stack.extruders[extruder_position]
|
||||
|
||||
available_material_dict = self._material_manager.getAvailableMaterialsForMachineExtruder(global_stack,
|
||||
extruder_stack)
|
||||
|
Loading…
x
Reference in New Issue
Block a user