mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-16 11:17:49 -06:00
CURA-3507 Make quality lookup more robust
This commit is contained in:
parent
41e3336ea9
commit
55727f20e5
1 changed files with 10 additions and 5 deletions
|
@ -731,6 +731,9 @@ class MachineManager(QObject):
|
|||
else:
|
||||
self._material_incompatible_message.hide()
|
||||
|
||||
quality_type = None
|
||||
new_quality_id = None
|
||||
if old_quality:
|
||||
new_quality_id = old_quality.getId()
|
||||
quality_type = old_quality.getMetaDataEntry("quality_type")
|
||||
if old_quality_changes:
|
||||
|
@ -740,6 +743,8 @@ class MachineManager(QObject):
|
|||
# See if the requested quality type is available in the new situation.
|
||||
machine_definition = self._active_container_stack.getBottom()
|
||||
quality_manager = QualityManager.getInstance()
|
||||
candidate_quality = None
|
||||
if quality_type:
|
||||
candidate_quality = quality_manager.findQualityByQualityType(quality_type,
|
||||
quality_manager.getWholeMachineDefinition(machine_definition),
|
||||
[material_container])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue