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 } }