mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 14:37:29 -06:00
Merge pull request #7223 from Ultimaker/CURA-7255_infill_only_dropdown
CURA-7255_infill_only_dropdown
This commit is contained in:
commit
3d054a9400
1 changed files with 25 additions and 20 deletions
|
@ -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,39 @@ 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 mesh only") })
|
||||
append({ text: catalog.i18nc("@item:inlistbox", "Cutting mesh") })
|
||||
}
|
||||
}
|
||||
|
||||
visible: currentMeshType === infillMeshType || currentMeshType === cuttingMeshType
|
||||
onClicked: setOverhangsMeshType()
|
||||
|
||||
|
||||
onActivated:
|
||||
{
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue