mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 08:36:04 +08:00
Fix KeyError in root material ID check
CURA-6827
This commit is contained in:
parent
51c96aecde
commit
aaca4bb9a1
@ -1246,7 +1246,7 @@ class MachineManager(QObject):
|
|||||||
self._global_container_stack.extruderList[int(position)].material = empty_material_container
|
self._global_container_stack.extruderList[int(position)].material = empty_material_container
|
||||||
root_material_id = None
|
root_material_id = None
|
||||||
# The _current_root_material_id is used in the MaterialMenu to see which material is selected
|
# The _current_root_material_id is used in the MaterialMenu to see which material is selected
|
||||||
if root_material_id != self._current_root_material_id[position]:
|
if position not in self._current_root_material_id or root_material_id != self._current_root_material_id[position]:
|
||||||
self._current_root_material_id[position] = root_material_id
|
self._current_root_material_id[position] = root_material_id
|
||||||
self.rootMaterialChanged.emit()
|
self.rootMaterialChanged.emit()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user