POS: Fix: currentMeshType reference

CURA-6683
This commit is contained in:
Nino van Hooff 2019-09-18 11:39:58 +02:00
parent 9fa2b26897
commit 53ea6ce1a7

View file

@ -29,6 +29,8 @@ Item
// Update the view every time the currentMeshType changes // Update the view every time the currentMeshType changes
onCurrentMeshTypeChanged: onCurrentMeshTypeChanged:
{ {
var type = currentMeshType
// set checked state of mesh type buttons // set checked state of mesh type buttons
normalButton.checked = type === normalMeshType normalButton.checked = type === normalMeshType
supportMeshButton.checked = type === supportMeshType supportMeshButton.checked = type === supportMeshType
@ -62,23 +64,6 @@ Item
UM.ActiveTool.setProperty("MeshType", type) UM.ActiveTool.setProperty("MeshType", type)
} }
function updateView(type) {
// set checked state of mesh type buttons
normalButton.checked = type === normal_mesh_type
supportMeshButton.checked = type === support_mesh_type
overhangMeshButton.checked = type === infill_mesh_type || type === cutting_mesh_type
antiOverhangMeshButton.checked = type === anti_overhang_mesh_type
// update active type label
for (var button in meshTypeButtons.children)
{
if(meshTypeButtons.children[button].checked){
meshTypeLabel.text = catalog.i18nc("@label","Mesh Type") + ": " + meshTypeButtons.children[button].text
break
}
}
}
UM.I18nCatalog { id: catalog; name: "uranium"} UM.I18nCatalog { id: catalog; name: "uranium"}
Column Column