From 6153fd70a836f32503c119b496f5ed2b48398fe2 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Mon, 3 Apr 2017 11:10:02 +0200 Subject: [PATCH] Set SettingsComboBox value if we get undefined from resolve CURA-3421 --- resources/qml/Settings/SettingComboBox.qml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/resources/qml/Settings/SettingComboBox.qml b/resources/qml/Settings/SettingComboBox.qml index dfa070667a..c655630a8e 100644 --- a/resources/qml/Settings/SettingComboBox.qml +++ b/resources/qml/Settings/SettingComboBox.qml @@ -95,13 +95,17 @@ SettingItem value: { // FIXME this needs to go away once 'resolve' is combined with 'value' in our data model. - var value; - if ((base.resolve != "None") && (base.stackLevel != 0) && (base.stackLevel != 1)) { + var value = undefined; + if ((base.resolve != "None") && (base.stackLevel != 0) && (base.stackLevel != 1)) + { // We have a resolve function. Indicates that the setting is not settable per extruder and that // we have to choose between the resolved value (default) and the global value // (if user has explicitly set this). value = base.resolve; - } else { + } + + if (value == undefined) + { value = propertyProvider.properties.value; }