diff --git a/resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml b/resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml index 8ad512349b..bdf5ccfaa1 100644 --- a/resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml +++ b/resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml @@ -39,6 +39,7 @@ Item Repeater { + id: repeater model: extrudersModel delegate: UM.TabRowButton { @@ -59,6 +60,18 @@ Item } } } + + //When the model of the extruders is rebuilt, the list of extruders is briefly emptied and rebuilt. + //This causes the currentIndex of the tab to be in an invalid position which resets it to 0. + //Therefore we need to change it back to what it was: The active extruder index. + Connections + { + target: repeater.model + onModelChanged: + { + tabBar.currentIndex = Math.max(Cura.ExtruderManager.activeExtruderIndex, 0) + } + } } Rectangle