mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-09 15:57:52 -06:00
CURA-4606 fix bug concerning activeMaterialsCompatible; factor out activeQualityName
This commit is contained in:
parent
363db9e536
commit
c3349baf39
2 changed files with 3 additions and 4 deletions
|
@ -1025,8 +1025,7 @@ class MachineManager(QObject):
|
||||||
candidate_quality_groups = quality_manager.getQualityGroups(self._global_container_stack)
|
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}
|
available_quality_types = {qt for qt, g in candidate_quality_groups.items() if g.is_available}
|
||||||
|
|
||||||
if not self.activeMaterialsCompatible:
|
if not self.activeMaterialsCompatible():
|
||||||
Logger.log("d", "Material [%s] is not compatible, setting empty material." % str(extruder.material))
|
|
||||||
self._setEmptyQuality()
|
self._setEmptyQuality()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -1139,7 +1138,7 @@ class MachineManager(QObject):
|
||||||
|
|
||||||
@pyqtProperty(str, notify = activeQualityGroupChanged)
|
@pyqtProperty(str, notify = activeQualityGroupChanged)
|
||||||
def activeQualityOrQualityChangesName(self):
|
def activeQualityOrQualityChangesName(self):
|
||||||
name = ""
|
name = self._empty_quality_container.getName()
|
||||||
if self._current_quality_changes_group:
|
if self._current_quality_changes_group:
|
||||||
name = self._current_quality_changes_group.name
|
name = self._current_quality_changes_group.name
|
||||||
elif self._current_quality_group:
|
elif self._current_quality_group:
|
||||||
|
|
|
@ -63,7 +63,7 @@ Item
|
||||||
menu: ProfileMenu { }
|
menu: ProfileMenu { }
|
||||||
|
|
||||||
function generateActiveQualityText () {
|
function generateActiveQualityText () {
|
||||||
var result = Cura.MachineManager.activeQualityName;
|
var result = Cura.MachineManager.activeQualityOrQualityChangesName;
|
||||||
|
|
||||||
if (Cura.MachineManager.isActiveQualitySupported) {
|
if (Cura.MachineManager.isActiveQualitySupported) {
|
||||||
if (Cura.MachineManager.activeQualityLayerHeight > 0) {
|
if (Cura.MachineManager.activeQualityLayerHeight > 0) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue