mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07:00
Fix materials models
This commit is contained in:
parent
97059daf6a
commit
844a597e08
2 changed files with 9 additions and 1 deletions
|
|
@ -73,6 +73,10 @@ class BrandMaterialsModel(ListModel):
|
||||||
if global_stack is None:
|
if global_stack is None:
|
||||||
self.setItems([])
|
self.setItems([])
|
||||||
return
|
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)]
|
extruder_stack = global_stack.extruders[str(self._extruder_position)]
|
||||||
|
|
||||||
available_material_dict = self._material_manager.getAvailableMaterialsForMachineExtruder(global_stack,
|
available_material_dict = self._material_manager.getAvailableMaterialsForMachineExtruder(global_stack,
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,11 @@ class GenericMaterialsModel(BaseMaterialsModel):
|
||||||
if global_stack is None:
|
if global_stack is None:
|
||||||
self.setItems([])
|
self.setItems([])
|
||||||
return
|
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,
|
available_material_dict = self._material_manager.getAvailableMaterialsForMachineExtruder(global_stack,
|
||||||
extruder_stack)
|
extruder_stack)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue