diff --git a/resources/qml/MachineSettings/ComboBoxWithOptions.qml b/resources/qml/MachineSettings/ComboBoxWithOptions.qml index 715a6e9224..0faf17ab71 100644 --- a/resources/qml/MachineSettings/ComboBoxWithOptions.qml +++ b/resources/qml/MachineSettings/ComboBoxWithOptions.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 @@ -71,14 +71,17 @@ UM.TooltipArea { clear() // Options come in as a string-representation of an OrderedDict - var options = propertyProvider.properties.options.match(/^OrderedDict\(\[\((.*)\)\]\)$/) - if (options) + if(propertyProvider.properties.options) { - options = options[1].split("), (") - for (var i = 0; i < options.length; i++) + var options = propertyProvider.properties.options.match(/^OrderedDict\(\[\((.*)\)\]\)$/); + if(options) { - var option = options[i].substring(1, options[i].length - 1).split("', '") - append({ text: option[1], value: option[0] }) + options = options[1].split("), ("); + for(var i = 0; i < options.length; i++) + { + var option = options[i].substring(1, options[i].length - 1).split("', '"); + append({ text: option[1], value: option[0] }); + } } } } diff --git a/resources/qml/PrintSetupSelector/Custom/QualitiesWithIntentMenu.qml b/resources/qml/PrintSetupSelector/Custom/QualitiesWithIntentMenu.qml index ff235a8a67..3ae180f133 100644 --- a/resources/qml/PrintSetupSelector/Custom/QualitiesWithIntentMenu.qml +++ b/resources/qml/PrintSetupSelector/Custom/QualitiesWithIntentMenu.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