mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 04:26:05 +08:00
Make sure a valid stack is activated after changing the number of extruders
This commit is contained in:
parent
818043854d
commit
7bc28a7e48
@ -377,6 +377,26 @@ Cura.MachineAction
|
|||||||
{
|
{
|
||||||
machineExtruderCountProvider.setPropertyValue("value", index + 1);
|
machineExtruderCountProvider.setPropertyValue("value", index + 1);
|
||||||
manager.forceUpdate();
|
manager.forceUpdate();
|
||||||
|
if(index > 0)
|
||||||
|
{
|
||||||
|
// multiextrusion; make sure one of these extruder stacks is active
|
||||||
|
if(ExtruderManager.activeExtruderIndex == -1)
|
||||||
|
{
|
||||||
|
ExtruderManager.setActiveExtruderIndex(0);
|
||||||
|
}
|
||||||
|
else if(ExtruderManager.activeExtruderIndex > index)
|
||||||
|
{
|
||||||
|
ExtruderManager.setActiveExtruderIndex(index);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// single extrusion; make sure the machine stack is active
|
||||||
|
if(ExtruderManager.activeExtruderIndex != -1)
|
||||||
|
{
|
||||||
|
ExtruderManager.setActiveExtruderIndex(-1);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Item { width: UM.Theme.getSize("default_margin").width; height: UM.Theme.getSize("default_margin").height; visible: extruderCountComboBox.visible }
|
Item { width: UM.Theme.getSize("default_margin").width; height: UM.Theme.getSize("default_margin").height; visible: extruderCountComboBox.visible }
|
||||||
@ -435,6 +455,7 @@ Cura.MachineAction
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
height: parent.height
|
height: parent.height
|
||||||
width: settingsTabs.columnWidth
|
width: settingsTabs.columnWidth
|
||||||
|
Loading…
x
Reference in New Issue
Block a user