From 606faf54c2fd67475f53c113951f59ac0f997b5f Mon Sep 17 00:00:00 2001 From: Nino van Hooff Date: Fri, 13 Sep 2019 12:01:48 +0200 Subject: [PATCH] Remove unnecessary component initialization CURA-6683 --- plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml index 23f2c63415..79ac52c72a 100644 --- a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml +++ b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml @@ -27,6 +27,8 @@ Item property var current_mesh_type: UM.ActiveTool.properties.getValue("MeshType") + onCurrent_mesh_typeChanged: updateView(current_mesh_type) + function setOverhangsMeshType(){ if (infillOnlyCheckbox.checked) { @@ -38,8 +40,11 @@ Item } } - function setMeshType(type) { + function setMeshType(type){ UM.ActiveTool.setProperty("MeshType", type) + } + + function updateView(type) { // set checked state of mesh type buttons normalButton.checked = type === normal_mesh_type @@ -67,8 +72,6 @@ Item spacing: UM.Theme.getSize("default_margin").height - Component.onCompleted: setMeshType(UM.ActiveTool.properties.getValue("MeshType")) - Row // Mesh type buttons { id: meshTypeButtons