mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Bind current_mesh_type to UM.ActiveTool.properties.getValue("MeshType")
CURA-6683
This commit is contained in:
parent
5db122aff6
commit
184a72f7ab
2 changed files with 15 additions and 14 deletions
|
@ -24,11 +24,11 @@ Item
|
|||
readonly property string infill_mesh_type: "infill_mesh"
|
||||
readonly property string anti_overhang_mesh_type: "anti_overhang_mesh"
|
||||
|
||||
property var current_mesh_type: normal_mesh_type
|
||||
property var current_mesh_type: UM.ActiveTool.properties.getValue("MeshType")
|
||||
|
||||
|
||||
function setOverhangsMeshType(){
|
||||
if(infillOnlyCheckbox.checked)
|
||||
if (infillOnlyCheckbox.checked)
|
||||
{
|
||||
setMeshType(infill_mesh_type)
|
||||
}
|
||||
|
@ -39,19 +39,13 @@ Item
|
|||
}
|
||||
|
||||
function setMeshType(type) {
|
||||
current_mesh_type = type
|
||||
|
||||
// update the active object
|
||||
if(UM.ActiveTool.properties.getValue("MeshType") !== type)
|
||||
{
|
||||
UM.ActiveTool.setProperty("MeshType", type)
|
||||
}
|
||||
UM.ActiveTool.setProperty("MeshType", type)
|
||||
|
||||
// set checked state of mesh type buttons
|
||||
normalButton.checked = current_mesh_type === normal_mesh_type
|
||||
supportMeshButton.checked = current_mesh_type === support_mesh_type
|
||||
overhangMeshButton.checked = current_mesh_type === infill_mesh_type || current_mesh_type === cutting_mesh_type
|
||||
antiOverhangMeshButton.checked = current_mesh_type === anti_overhang_mesh_type
|
||||
normalButton.checked = type === normal_mesh_type
|
||||
supportMeshButton.checked = type === support_mesh_type
|
||||
overhangMeshButton.checked = type === infill_mesh_type || type === cutting_mesh_type
|
||||
antiOverhangMeshButton.checked = type === anti_overhang_mesh_type
|
||||
|
||||
// update active type label
|
||||
for (var button in meshTypeButtons.children)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue