From d5d49fcec8ea3888ff53b47285322c56407e555a Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 30 Nov 2018 16:43:48 +0100 Subject: [PATCH] Disable extruder enabled checkbox if it's the last one You can't disable the last extruder. Contributes to issue CURA-5876. --- .../qml/Menus/ConfigurationMenu/CustomConfiguration.qml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml b/resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml index 08ba042948..6a3ab82ce2 100644 --- a/resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml +++ b/resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml @@ -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 } } }