mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-08 22:35:03 -06:00
Move createMaterial to MaterialManagementModel and simplify it a bit
We can reuse our duplicateMaterial function again but in a simpler way. Also finding the preferred material is simpler with our container tree. However there seems to be a problem with finding the preferred material; it's not finding generic_pla for UM3 and AA0.4 anyway, and then falls back on a random material. This needs to be fixed in the variant node class. Contributes to issue CURA-6600.
This commit is contained in:
parent
cb344f9dec
commit
3952366798
2 changed files with 37 additions and 2 deletions
|
@ -122,7 +122,7 @@ Item
|
|||
onClicked:
|
||||
{
|
||||
forceActiveFocus();
|
||||
base.newRootMaterialIdToSwitchTo = base.materialManager.createMaterial();
|
||||
base.newRootMaterialIdToSwitchTo = base.materialManagementModel.createMaterial();
|
||||
base.toActivateNewMaterial = true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue