diff options
author | Lipu Fei <lipu.fei815@gmail.com> | 2018-03-14 13:05:32 +0300 |
---|---|---|
committer | Lipu Fei <lipu.fei815@gmail.com> | 2018-03-14 13:05:32 +0300 |
commit | f5f8bf19ecdd0e463b8eb3626639637cfd76e8d8 (patch) | |
tree | 7aba93d7e6e5afa932065b6e9b9f2a2aa3d29a38 /resources/qml/SidebarHeader.qml | |
parent | 8efc3b8b5d454d5b5bae8687da8740879d444c48 (diff) |
Fix QML warnings
Diffstat (limited to 'resources/qml/SidebarHeader.qml')
-rw-r--r-- | resources/qml/SidebarHeader.qml | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/resources/qml/SidebarHeader.qml b/resources/qml/SidebarHeader.qml index 74e189789d..dcb351e866 100644 --- a/resources/qml/SidebarHeader.qml +++ b/resources/qml/SidebarHeader.qml @@ -347,7 +347,8 @@ Column id: materialSelection 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 tooltip: currentRootMaterialName @@ -366,6 +367,10 @@ Column property var valueWarning: ! Cura.MachineManager.isActiveQualitySupported function isMaterialSupported () { + if (!hasActiveExtruder) + { + return false; + } return Cura.ContainerManager.getContainerMetaDataEntry(activeExtruder.material.id, "compatible") == "True" } } |