From 3f8b7fb6aff9b0e3afa1fe0598becf639c2e604a Mon Sep 17 00:00:00 2001 From: Aleksei S Date: Mon, 1 Oct 2018 11:30:21 +0200 Subject: [PATCH] Fix: Switches to 'Prepare' always go through 'Recomended' mode CURA-5731 --- resources/qml/PrepareSidebar.qml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/resources/qml/PrepareSidebar.qml b/resources/qml/PrepareSidebar.qml index 78b6a22ef9..fe0fb033f7 100644 --- a/resources/qml/PrepareSidebar.qml +++ b/resources/qml/PrepareSidebar.qml @@ -14,7 +14,7 @@ Rectangle { id: base - property int currentModeIndex + property int currentModeIndex: -1 property bool hideSettings: PrintInformation.preSliced property bool hideView: Cura.MachineManager.activeMachineName == "" @@ -262,7 +262,6 @@ Rectangle ListView { id: modesList - property var index: 0 model: modesListModel delegate: wizardDelegate anchors.top: parent.top @@ -582,13 +581,17 @@ Rectangle tooltipText: catalog.i18nc("@tooltip", "Custom Print Setup

Print with finegrained control over every last bit of the slicing process."), item: sidebarAdvanced }) - sidebarContents.replace(modesListModel.get(base.currentModeIndex).item, { "immediate": true }) var index = Math.round(UM.Preferences.getValue("cura/active_mode")) - if(index) + + if(index != null && !isNaN(index)) { currentModeIndex = index; } + else + { + currentModeIndex = 0; + } } UM.SettingPropertyProvider