Fix 1/2 of the duplication material bug.

The material is added multiple times to the variant nodes, and overwriting it with the eventual right one was going wrong.
This does not solve it entirely (because the less specific one still ends up selected _initially_ because it gets added first, and the order can't be guaranteed.
part of CURA-6863
This commit is contained in:
Remco Burema 2019-10-14 01:01:19 +02:00
parent 25db711adc
commit 4277ede64f
2 changed files with 6 additions and 7 deletions

View file

@ -114,7 +114,7 @@ Item
if (base.toActivateNewMaterial)
{
var position = Cura.ExtruderManager.activeExtruderIndex
Cura.MachineManager.setMaterial(position, base.currentItem.container_node)
Cura.MachineManager.setMaterialById(position, base.newRootMaterialIdToSwitchTo)
}
base.newRootMaterialIdToSwitchTo = ""
base.toActivateNewMaterial = false