diff options
author | Jaime van Kessel <nallath@gmail.com> | 2019-10-10 14:03:39 +0300 |
---|---|---|
committer | Jaime van Kessel <nallath@gmail.com> | 2019-10-10 14:03:39 +0300 |
commit | 07a20e131aa96f440eb89a2ab575eedc880bbcf6 (patch) | |
tree | 57cb8e53be6211a38b3f6bd66ffd790c5c92b2af /resources | |
parent | ec4817db8725bb3012ca0b980e8eaec0a99a0ea4 (diff) |
Prevent changing material / variant of disabled extruder
It is disabled, so changing it's material / variant doesn't make that much sense...
CURA-6872
Diffstat (limited to 'resources')
-rw-r--r-- | resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml | 5 | ||||
-rw-r--r-- | resources/qml/Menus/MaterialMenu.qml | 3 | ||||
-rw-r--r-- | resources/qml/Menus/NozzleMenu.qml | 2 |
3 files changed, 8 insertions, 2 deletions
diff --git a/resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml b/resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml index 6f3d6ffa17..fda9ee35ac 100644 --- a/resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml +++ b/resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml @@ -221,6 +221,7 @@ Item OldControls.CheckBox { + id: enabledCheckbox 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: parent.height @@ -265,6 +266,7 @@ Item text: Cura.MachineManager.activeStack !== null ? Cura.MachineManager.activeStack.material.name : "" tooltip: text + enabled: enabledCheckbox.checked width: selectors.controlWidth height: parent.height @@ -324,7 +326,8 @@ Item height: parent.height width: selectors.controlWidth style: UM.Theme.styles.print_setup_header_button - activeFocusOnPress: true; + activeFocusOnPress: true + enabled: enabledCheckbox.checked menu: Cura.NozzleMenu { extruderIndex: Cura.ExtruderManager.activeExtruderIndex } } diff --git a/resources/qml/Menus/MaterialMenu.qml b/resources/qml/Menus/MaterialMenu.qml index a574e240d3..9720c81879 100644 --- a/resources/qml/Menus/MaterialMenu.qml +++ b/resources/qml/Menus/MaterialMenu.qml @@ -50,6 +50,7 @@ Menu { text: model.brand + " " + model.name checkable: true + enabled: Cura.MachineManager.activeMachine.extruderList[extruderIndex].isEnabled checked: model.root_material_id === menu.currentRootMaterialId onTriggered: Cura.MachineManager.setMaterial(extruderIndex, model.container_node) exclusiveGroup: favoriteGroup // One favorite and one item from the others can be active at the same time. @@ -72,6 +73,7 @@ Menu { text: model.name checkable: true + enabled: Cura.MachineManager.activeMachine.extruderList[extruderIndex].isEnabled checked: model.root_material_id === menu.currentRootMaterialId exclusiveGroup: group onTriggered: Cura.MachineManager.setMaterial(extruderIndex, model.container_node) @@ -110,6 +112,7 @@ Menu { text: model.name checkable: true + enabled: Cura.MachineManager.activeMachine.extruderList[extruderIndex].isEnabled checked: model.id === menu.activeMaterialId exclusiveGroup: group onTriggered: Cura.MachineManager.setMaterial(extruderIndex, model.container_node) diff --git a/resources/qml/Menus/NozzleMenu.qml b/resources/qml/Menus/NozzleMenu.qml index a94ad10330..a291f125eb 100644 --- a/resources/qml/Menus/NozzleMenu.qml +++ b/resources/qml/Menus/NozzleMenu.qml @@ -32,7 +32,7 @@ Menu return extruder.variant.name == model.hotend_name } exclusiveGroup: group - + enabled: Cura.MachineManager.activeMachine.extruderList[extruderIndex].isEnabled onTriggered: { Cura.MachineManager.setVariant(menu.extruderIndex, model.container_node); } |