Don't check on type equality to check if material is set

As suggested by code review

CURA-9044
This commit is contained in:
casper 2022-03-22 13:46:31 +01:00
parent 1e15197d44
commit 5d3b22f45a

View file

@ -16,7 +16,7 @@ Rectangle
property var material: null property var material: null
property bool hovered: false property bool hovered: false
property bool isActive: material !== null && Cura.MachineManager.currentRootMaterialId[Cura.ExtruderManager.activeExtruderIndex] == material.root_material_id property bool isActive: material != null && Cura.MachineManager.currentRootMaterialId[Cura.ExtruderManager.activeExtruderIndex] == material.root_material_id
height: UM.Theme.getSize("preferences_page_list_item").height height: UM.Theme.getSize("preferences_page_list_item").height
width: parent.width width: parent.width