mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-15 18:57:52 -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)
|
visibility_handler.addSkipResetSetting(currentMeshType)
|
||||||
}
|
}
|
||||||
|
|
||||||
function setOverhangsMeshType()
|
|
||||||
{
|
|
||||||
if (infillOnlyCheckbox.checked)
|
|
||||||
{
|
|
||||||
setMeshType(infillMeshType)
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
setMeshType(cuttingMeshType)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function setMeshType(type)
|
function setMeshType(type)
|
||||||
{
|
{
|
||||||
UM.ActiveTool.setProperty("MeshType", type)
|
UM.ActiveTool.setProperty("MeshType", type)
|
||||||
|
@ -140,22 +128,39 @@ Item
|
||||||
verticalAlignment: Text.AlignVCenter
|
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
|
visible: currentMeshType === infillMeshType || currentMeshType === cuttingMeshType
|
||||||
onClicked: setOverhangsMeshType()
|
|
||||||
|
|
||||||
|
onActivated:
|
||||||
|
{
|
||||||
|
if (index == 0){
|
||||||
|
setMeshType(infillMeshType)
|
||||||
|
} else {
|
||||||
|
setMeshType(cuttingMeshType)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Binding
|
Binding
|
||||||
{
|
{
|
||||||
target: infillOnlyCheckbox
|
target: infillOnlyComboBox
|
||||||
property: "checked"
|
property: "currentIndex"
|
||||||
value: currentMeshType === infillMeshType
|
value: currentMeshType === infillMeshType ? 0 : 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue