mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 15:29:02 +08:00
Fix QML warnings
This commit is contained in:
parent
8efc3b8b5d
commit
f5f8bf19ec
@ -347,7 +347,8 @@ Column
|
|||||||
id: materialSelection
|
id: materialSelection
|
||||||
|
|
||||||
property var activeExtruder: Cura.MachineManager.activeStack
|
property var activeExtruder: Cura.MachineManager.activeStack
|
||||||
property var currentRootMaterialName: activeExtruder.material.name
|
property var hasActiveExtruder: activeExtruder != null
|
||||||
|
property var currentRootMaterialName: hasActiveExtruder ? activeExtruder.material.name : ""
|
||||||
|
|
||||||
text: currentRootMaterialName
|
text: currentRootMaterialName
|
||||||
tooltip: currentRootMaterialName
|
tooltip: currentRootMaterialName
|
||||||
@ -366,6 +367,10 @@ Column
|
|||||||
property var valueWarning: ! Cura.MachineManager.isActiveQualitySupported
|
property var valueWarning: ! Cura.MachineManager.isActiveQualitySupported
|
||||||
|
|
||||||
function isMaterialSupported () {
|
function isMaterialSupported () {
|
||||||
|
if (!hasActiveExtruder)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return Cura.ContainerManager.getContainerMetaDataEntry(activeExtruder.material.id, "compatible") == "True"
|
return Cura.ContainerManager.getContainerMetaDataEntry(activeExtruder.material.id, "compatible") == "True"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -101,7 +101,7 @@ UM.Dialog
|
|||||||
}
|
}
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
text: Cura.MachineManager.activeMachine.definition.name
|
text: (Cura.MachineManager.activeMachine == null) ? "" : Cura.MachineManager.activeMachine.definition.name
|
||||||
width: (parent.width / 3) | 0
|
width: (parent.width / 3) | 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user