diff options
author | Lipu Fei <lipu.fei815@gmail.com> | 2019-02-22 15:37:10 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-22 15:37:10 +0300 |
commit | 2694ef98e07a547e43ed08943d2cfaf3b02692c4 (patch) | |
tree | b70bb67fae2a444fc9197efba9e9aeba9ce35bdd | |
parent | 271573d0aee3faf7c4c72cfd994b31ff6d2dac0f (diff) | |
parent | b4e4b7125d5decfa972d76153aaa0640b662210e (diff) |
Merge pull request #5338 from Ultimaker/CURA-6232_config_menu_tab_fix4.0-beta
Fix tab-bar of config.-menu always on idex 0 on reshow. [CURA-6232]
-rw-r--r-- | resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml b/resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml index d05ef09c92..d2b8352fa8 100644 --- a/resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml +++ b/resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml @@ -124,6 +124,15 @@ Item } } + // Can't use 'item: ...activeExtruderIndex' directly apparently, see also the comment on the previous block. + onVisibleChanged: + { + if (tabBar.visible) + { + tabBar.setCurrentIndex(Cura.ExtruderManager.activeExtruderIndex); + } + } + //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. |