mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-05 13:03:59 -06:00
Disable extruder enabled checkbox if it's the last one
You can't disable the last extruder. Contributes to issue CURA-5876.
This commit is contained in:
parent
82d4897ba4
commit
d5d49fcec8
1 changed files with 8 additions and 0 deletions
|
@ -10,6 +10,12 @@ import UM 1.3 as UM
|
|||
|
||||
Item
|
||||
{
|
||||
UM.I18nCatalog
|
||||
{
|
||||
id: catalog
|
||||
name: "cura"
|
||||
}
|
||||
|
||||
width: parent.width
|
||||
height: visible ? childrenRect.height : 0
|
||||
|
||||
|
@ -136,6 +142,7 @@ Item
|
|||
OldControls.CheckBox
|
||||
{
|
||||
checked: Cura.MachineManager.activeStack != null ? Cura.MachineManager.activeStack.isEnabled : false
|
||||
enabled: !checked || Cura.MachineManager.numberExtrudersEnabled > 1 //Disable if it's the last enabled extruder.
|
||||
height: UM.Theme.getSize("setting_control").height
|
||||
style: UM.Theme.styles.checkbox
|
||||
|
||||
|
@ -148,6 +155,7 @@ Item
|
|||
{
|
||||
anchors.fill: parent
|
||||
onClicked: Cura.MachineManager.setExtruderEnabled(Cura.ExtruderManager.activeExtruderIndex, !parent.checked)
|
||||
enabled: parent.enabled
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue