mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Update mesh type dropdown when to reflect the selected object
This commit is contained in:
parent
9c3e50c494
commit
a1320939e8
2 changed files with 37 additions and 1 deletions
|
@ -67,9 +67,32 @@ Item {
|
|||
type: "cutting_mesh",
|
||||
text: catalog.i18nc("@label", "Modify extruder or settings for overlap with other models")
|
||||
});
|
||||
|
||||
meshTypeSelection.updateCurrentIndex();
|
||||
}
|
||||
}
|
||||
|
||||
function updateCurrentIndex()
|
||||
{
|
||||
var mesh_type = UM.ActiveTool.properties.getValue("MeshType");
|
||||
for(var index=0; index < meshTypeSelection.model.count; index++)
|
||||
{
|
||||
if(meshTypeSelection.model.get(index).type == mesh_type)
|
||||
{
|
||||
meshTypeSelection.currentIndex = index;
|
||||
return;
|
||||
}
|
||||
}
|
||||
meshTypeSelection.currentIndex = 0;
|
||||
}
|
||||
}
|
||||
|
||||
Connections
|
||||
{
|
||||
target: UM.Selection
|
||||
onSelectionChanged: meshTypeSelection.updateCurrentIndex()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Column
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue