mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 07:03:56 -06:00
CURA-4606 incompatible material(s) now results in an empty quality list
This commit is contained in:
parent
b96d49c010
commit
8401e1c7f7
2 changed files with 19 additions and 1 deletions
|
@ -1018,6 +1018,13 @@ class MachineManager(QObject):
|
|||
self._current_root_material_id[position] = root_material_id
|
||||
self.rootMaterialChanged.emit()
|
||||
|
||||
def activeMaterialsCompatible(self):
|
||||
# check material - variant compatibility
|
||||
for position, extruder in self._global_container_stack.extruders.items():
|
||||
if not extruder.material.getMetaDataEntry("compatible"):
|
||||
return False
|
||||
return True
|
||||
|
||||
## Update current quality type and machine after setting material
|
||||
def _updateQualityWithMaterial(self):
|
||||
current_quality = None
|
||||
|
@ -1027,6 +1034,11 @@ class MachineManager(QObject):
|
|||
candidate_quality_groups = quality_manager.getQualityGroups(self._global_container_stack)
|
||||
available_quality_types = {qt for qt, g in candidate_quality_groups.items() if g.is_available}
|
||||
|
||||
if not self.activeMaterialsCompatible:
|
||||
Logger.log("d", "Material [%s] is not compatible, setting empty material." % str(extruder.material))
|
||||
self._setEmptyQuality()
|
||||
return
|
||||
|
||||
if not available_quality_types:
|
||||
self._setEmptyQuality()
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue