mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-07 22:13:58 -06:00
Add "Create" button to create a new, unique material.
The new custom material is still based on generic_pla, but it gets a new GUID and uses itself as base_file so it is not conjoined to another material.
This commit is contained in:
parent
d0a95426cb
commit
02b978272f
2 changed files with 45 additions and 0 deletions
|
@ -135,6 +135,23 @@ UM.ManagementPage
|
|||
}
|
||||
},
|
||||
Button
|
||||
{
|
||||
text: catalog.i18nc("@action:button", "Create")
|
||||
iconName: "list-add"
|
||||
onClicked:
|
||||
{
|
||||
var material_id = Cura.ContainerManager.createMaterial()
|
||||
if(material_id == "")
|
||||
{
|
||||
return
|
||||
}
|
||||
if(Cura.MachineManager.hasMaterials)
|
||||
{
|
||||
Cura.MachineManager.setActiveMaterial(material_id)
|
||||
}
|
||||
}
|
||||
},
|
||||
Button
|
||||
{
|
||||
text: catalog.i18nc("@action:button", "Duplicate");
|
||||
iconName: "list-add";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue