From af747ae09c254327dd5d85e90a2cea86cc5d5562 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 3 Dec 2018 11:19:25 +0100 Subject: [PATCH] Don't hide tab bar when disabling all but one extruder And make sure the checkbox for enabling also disappears. We don't want to make this dependent on the number of enabled extruders, but on the total number of extruders. This way you can actually re-enable an extruder again because the tab bar shouldn't disappear. Contributes to issue CURA-5876. --- resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml b/resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml index eae160b48a..7ff47ea16f 100644 --- a/resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml +++ b/resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml @@ -40,7 +40,7 @@ Item id: tabBar anchors.top: header.bottom anchors.topMargin: UM.Theme.getSize("default_margin").height - visible: Cura.MachineManager.numberExtrudersEnabled > 1 + visible: extrudersModel.count > 1 currentIndex: Math.max(Cura.ExtruderManager.activeExtruderIndex, 0) @@ -138,6 +138,7 @@ Item color: UM.Theme.getColor("text") height: parent.height width: selectors.textWidth + visible: extrudersModel.count > 1 } OldControls.CheckBox @@ -146,6 +147,7 @@ Item 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 + visible: extrudersModel.count > 1 /* Use a MouseArea to process the click on this checkbox. This is necessary because actually clicking the checkbox