diff --git a/resources/qml/MachineSettings/ComboBoxWithOptions.qml b/resources/qml/MachineSettings/ComboBoxWithOptions.qml index 0faf17ab71..67177ce936 100644 --- a/resources/qml/MachineSettings/ComboBoxWithOptions.qml +++ b/resources/qml/MachineSettings/ComboBoxWithOptions.qml @@ -36,7 +36,7 @@ UM.TooltipArea property alias labelWidth: fieldLabel.width property alias optionModel: comboBox.model - property string tooltipText: propertyProvider.properties.description + property string tooltipText: propertyProvider.properties.description ? propertyProvider.properties.description : "" // callback functions property var forceUpdateOnChangeFunction: dummy_func diff --git a/resources/qml/MachineSettings/GcodeTextArea.qml b/resources/qml/MachineSettings/GcodeTextArea.qml index a5c1c4ca04..f8bd02de3b 100644 --- a/resources/qml/MachineSettings/GcodeTextArea.qml +++ b/resources/qml/MachineSettings/GcodeTextArea.qml @@ -1,4 +1,4 @@ -// Copyright (c) 2019 Ultimaker B.V. +// Copyright (c) 2020 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.10 @@ -24,7 +24,7 @@ UM.TooltipArea property alias settingKey: propertyProvider.key property alias settingStoreIndex: propertyProvider.storeIndex - property string tooltip: propertyProvider.properties.description + property string tooltip: propertyProvider.properties.description ? propertyProvider.properties.description : "" property alias labelText: titleLabel.text property alias labelFont: titleLabel.font diff --git a/resources/qml/MachineSettings/NumericTextFieldWithUnit.qml b/resources/qml/MachineSettings/NumericTextFieldWithUnit.qml index 46e9031d1d..a4ff27391f 100644 --- a/resources/qml/MachineSettings/NumericTextFieldWithUnit.qml +++ b/resources/qml/MachineSettings/NumericTextFieldWithUnit.qml @@ -1,4 +1,4 @@ -// Copyright (c) 2019 Ultimaker B.V. +// Copyright (c) 2020 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.10 @@ -39,7 +39,7 @@ UM.TooltipArea property alias valueText: textFieldWithUnit.text property alias editingFinishedFunction: textFieldWithUnit.editingFinishedFunction - property string tooltipText: propertyProvider.properties.description + property string tooltipText: propertyProvider.properties.description ? propertyProvider.properties.description : "" property real minimum: 0 property real maximum: Number.POSITIVE_INFINITY diff --git a/resources/qml/MachineSettings/PrintHeadMinMaxTextField.qml b/resources/qml/MachineSettings/PrintHeadMinMaxTextField.qml index 222f48b280..8f24ce6204 100644 --- a/resources/qml/MachineSettings/PrintHeadMinMaxTextField.qml +++ b/resources/qml/MachineSettings/PrintHeadMinMaxTextField.qml @@ -1,4 +1,4 @@ -// Copyright (c) 2019 Ultimaker B.V. +// Copyright (c) 2020 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.10 @@ -35,15 +35,18 @@ NumericTextFieldWithUnit property string axisMinOrMax: "min" property var axisValue: { - var polygon = JSON.parse(propertyProvider.properties.value) - var item = (axisName == "x") ? 0 : 1 - var result = polygon[0][item] - var func = (axisMinOrMax == "min") ? Math.min : Math.max + if(propertyProvider.properties.value === undefined) { //PropertyProvider not initialised yet or there is no global stack. + return 0; + } + var polygon = JSON.parse(propertyProvider.properties.value); + var item = (axisName == "x") ? 0 : 1; + var result = polygon[0][item]; + var func = (axisMinOrMax == "min") ? Math.min : Math.max; for (var i = 1; i < polygon.length; i++) { - result = func(result, polygon[i][item]) + result = func(result, polygon[i][item]); } - return result + return result; } valueText: axisValue diff --git a/resources/qml/MachineSettings/SimpleCheckBox.qml b/resources/qml/MachineSettings/SimpleCheckBox.qml index 49ff9fd6e9..821c68745a 100644 --- a/resources/qml/MachineSettings/SimpleCheckBox.qml +++ b/resources/qml/MachineSettings/SimpleCheckBox.qml @@ -1,4 +1,4 @@ -// Copyright (c) 2019 Ultimaker B.V. +// Copyright (c) 2020 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.10 @@ -32,7 +32,7 @@ UM.TooltipArea property alias labelFont: fieldLabel.font property alias labelWidth: fieldLabel.width - property string tooltip: propertyProvider.properties.description + property string tooltip: propertyProvider.properties.description ? propertyProvider.properties.description : "" // callback functions property var forceUpdateOnChangeFunction: dummy_func