mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-10 19:18:58 +08:00
Restore material on global stack when switching back to single extrusion
MachineManager._onGlobalContainerChanged removes the global material of multiextruder machines
This commit is contained in:
parent
31ecb30c03
commit
f15345a0cb
@ -370,6 +370,13 @@ Cura.MachineAction
|
||||
return;
|
||||
}
|
||||
|
||||
var extruder_material;
|
||||
if(index == 0 && Cura.MachineManager.hasMaterials)
|
||||
{
|
||||
// setting back to single extrusion
|
||||
extruder_material = Cura.MachineManager.allActiveMaterialIds[Cura.MachineManager.activeStackId];
|
||||
}
|
||||
|
||||
machineExtruderCountProvider.setPropertyValue("value", index + 1);
|
||||
manager.forceUpdate();
|
||||
base.extruderTabsCount = (index > 0) ? index + 1 : 0;
|
||||
@ -389,6 +396,12 @@ Cura.MachineAction
|
||||
{
|
||||
ExtruderManager.setActiveExtruderIndex(-1);
|
||||
}
|
||||
if(extruder_material)
|
||||
{
|
||||
// restore material on global stack
|
||||
// MachineManager._onGlobalContainerChanged removes the global material of multiextruder machines
|
||||
Cura.MachineManager.setActiveMaterial(extruder_material);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user