From a14eb50fec674c0000ca011ce603051011ee7177 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Mon, 27 May 2019 13:40:37 +0200 Subject: [PATCH] Handle the case that resolve is undefined CURA-6490 --- resources/qml/Settings/SettingCheckBox.qml | 2 +- resources/qml/Settings/SettingComboBox.qml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/qml/Settings/SettingCheckBox.qml b/resources/qml/Settings/SettingCheckBox.qml index 0c7321d08a..8c0c58f371 100644 --- a/resources/qml/Settings/SettingCheckBox.qml +++ b/resources/qml/Settings/SettingCheckBox.qml @@ -29,7 +29,7 @@ SettingItem // 4: variant // 5: machine var value - if ((base.resolve != "None") && (stackLevel != 0) && (stackLevel != 1)) + if ((base.resolve !== undefined && base.resolve != "None") && (stackLevel != 0) && (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 diff --git a/resources/qml/Settings/SettingComboBox.qml b/resources/qml/Settings/SettingComboBox.qml index 37df0bd9b9..6fcc1951a4 100644 --- a/resources/qml/Settings/SettingComboBox.qml +++ b/resources/qml/Settings/SettingComboBox.qml @@ -54,7 +54,7 @@ SettingItem { // FIXME this needs to go away once 'resolve' is combined with 'value' in our data model. var value = undefined - if ((base.resolve != "None") && (base.stackLevel != 0) && (base.stackLevel != 1)) + if ((base.resolve !== undefined && 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