From e93bbf07a4e377bb55e7b5c62292487344fcc29a Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 30 Nov 2018 14:53:10 +0100 Subject: [PATCH] Fix circular dependency with tab index and active stack Only when actually clicking the tab should it change the active extruder index; not when the current index is changed for any other reason. Next up: Don't change the current index for any other reason. Contributes to issue CURA-5876. --- .../qml/Menus/ConfigurationMenu/CustomConfiguration.qml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml b/resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml index 87096c3a14..8ad512349b 100644 --- a/resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml +++ b/resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml @@ -35,7 +35,7 @@ Item anchors.top: header.bottom anchors.topMargin: UM.Theme.getSize("default_margin").height - onCurrentIndexChanged: Cura.ExtruderManager.setActiveExtruderIndex(currentIndex) + currentIndex: Math.max(Cura.ExtruderManager.activeExtruderIndex, 0) Repeater { @@ -53,6 +53,10 @@ Item height: parent.height } } + onClicked: + { + Cura.ExtruderManager.setActiveExtruderIndex(tabBar.currentIndex) + } } } }