From dc6339b2950029b42e177d92a7b1f8ce2bd6d779 Mon Sep 17 00:00:00 2001 From: Nino van Hooff Date: Wed, 4 Mar 2020 11:56:57 +0100 Subject: [PATCH 1/3] Change the infill-only checkbox in per object settings to a dropdown CURA-7255 --- .../PerObjectSettingsPanel.qml | 46 +++++++++++-------- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml index 109b66a11b..ce14b97a59 100644 --- a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml +++ b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml @@ -49,18 +49,6 @@ Item visibility_handler.addSkipResetSetting(currentMeshType) } - function setOverhangsMeshType() - { - if (infillOnlyCheckbox.checked) - { - setMeshType(infillMeshType) - } - else - { - setMeshType(cuttingMeshType) - } - } - function setMeshType(type) { UM.ActiveTool.setProperty("MeshType", type) @@ -140,22 +128,40 @@ Item verticalAlignment: Text.AlignVCenter } - CheckBox + + ComboBox { - id: infillOnlyCheckbox + id: infillOnlyComboBox + width: parent.width / 2 - UM.Theme.getSize("default_margin").width - text: catalog.i18nc("@action:checkbox", "Infill only"); + model: ListModel + { + id: infillOnlyComboBoxModel - style: UM.Theme.styles.checkbox; + Component.onCompleted: { + append({ text: catalog.i18nc("@item:inlistbox", "Infill only") }) + append({ text: catalog.i18nc("@item:inlistbox", "Cutting mesh") }) + } + } visible: currentMeshType === infillMeshType || currentMeshType === cuttingMeshType - onClicked: setOverhangsMeshType() + + + onActivated: + { + print(index) + if (index == 0){ + setMeshType(infillMeshType) + } else { + setMeshType(cuttingMeshType) + } + } Binding { - target: infillOnlyCheckbox - property: "checked" - value: currentMeshType === infillMeshType + target: infillOnlyComboBox + property: "currentIndex" + value: currentMeshType === infillMeshType ? 0 : 1 } } From 8c0a2ff72e12715530efed23a26b1e72ed761860 Mon Sep 17 00:00:00 2001 From: Nino van Hooff Date: Fri, 6 Mar 2020 11:14:49 +0100 Subject: [PATCH 2/3] Remove debug print --- plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml index ce14b97a59..801fdc59be 100644 --- a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml +++ b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml @@ -149,7 +149,6 @@ Item onActivated: { - print(index) if (index == 0){ setMeshType(infillMeshType) } else { From 2625bbef44ab2cf6c2c0addf49d47cf2caa6be47 Mon Sep 17 00:00:00 2001 From: Nino van Hooff Date: Thu, 12 Mar 2020 14:01:03 +0100 Subject: [PATCH 3/3] Changed pos infill only label per suggestions by Tim and Yi-An CURA-7255 --- plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml index 801fdc59be..5a71fc1ad8 100644 --- a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml +++ b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml @@ -139,7 +139,7 @@ Item id: infillOnlyComboBoxModel Component.onCompleted: { - append({ text: catalog.i18nc("@item:inlistbox", "Infill only") }) + append({ text: catalog.i18nc("@item:inlistbox", "Infill mesh only") }) append({ text: catalog.i18nc("@item:inlistbox", "Cutting mesh") }) } }