Remove unnecessary component initialization

CURA-6683
This commit is contained in:
Nino van Hooff 2019-09-13 12:01:48 +02:00
parent fe0e1e5aba
commit 606faf54c2

View file

@ -27,6 +27,8 @@ Item
property var current_mesh_type: UM.ActiveTool.properties.getValue("MeshType") property var current_mesh_type: UM.ActiveTool.properties.getValue("MeshType")
onCurrent_mesh_typeChanged: updateView(current_mesh_type)
function setOverhangsMeshType(){ function setOverhangsMeshType(){
if (infillOnlyCheckbox.checked) if (infillOnlyCheckbox.checked)
{ {
@ -38,8 +40,11 @@ Item
} }
} }
function setMeshType(type) { function setMeshType(type){
UM.ActiveTool.setProperty("MeshType", type) UM.ActiveTool.setProperty("MeshType", type)
}
function updateView(type) {
// set checked state of mesh type buttons // set checked state of mesh type buttons
normalButton.checked = type === normal_mesh_type normalButton.checked = type === normal_mesh_type
@ -67,8 +72,6 @@ Item
spacing: UM.Theme.getSize("default_margin").height spacing: UM.Theme.getSize("default_margin").height
Component.onCompleted: setMeshType(UM.ActiveTool.properties.getValue("MeshType"))
Row // Mesh type buttons Row // Mesh type buttons
{ {
id: meshTypeButtons id: meshTypeButtons