diff --git a/cura/Machines/MaterialManager.py b/cura/Machines/MaterialManager.py index 54216972a4..ae679a5ee6 100644 --- a/cura/Machines/MaterialManager.py +++ b/cura/Machines/MaterialManager.py @@ -314,7 +314,8 @@ class MaterialManager(QObject): def getFallbackMaterialId(self, material_type: str) -> str: # For safety if material_type not in self._fallback_materials_map: - raise RuntimeError("Material type [%s] is not in the fallback materials table." % material_type) + Logger.log("w", "The material type [%s] does not have a fallback material" % material_type) + return None fallback_material = self._fallback_materials_map[material_type] if fallback_material: return self.getRootMaterialIDWithoutDiameter(fallback_material["id"]) diff --git a/resources/qml/Preferences/MaterialsPage.qml b/resources/qml/Preferences/MaterialsPage.qml index 22d906ac62..de7b629f48 100644 --- a/resources/qml/Preferences/MaterialsPage.qml +++ b/resources/qml/Preferences/MaterialsPage.qml @@ -350,6 +350,7 @@ Item onCurrentIndexChanged: { + forceActiveFocus(); // causes the changed fields to be saved var model = materialsModel.getItem(currentIndex); materialDetailsView.containerId = model.container_id; materialDetailsView.currentMaterialNode = model.container_node;