From cd8c5029d2b23de79d6cdaa2b4928020aa4947bb Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Wed, 6 Mar 2024 16:00:38 +0100 Subject: [PATCH] Remove useless code The resolve properties on the QML objects cause a crash in PyQt. They are not the actual cause, because this should work anyway. But for now, they are however completely useless because the material bed temperature setting can't have a resolve function, so we can remove them anyway. CURA-11657 --- resources/qml/PrintMonitor.qml | 2 -- resources/qml/PrinterOutput/ExtruderBox.qml | 2 -- resources/qml/PrinterOutput/HeatedBedBox.qml | 12 +----------- 3 files changed, 1 insertion(+), 15 deletions(-) diff --git a/resources/qml/PrintMonitor.qml b/resources/qml/PrintMonitor.qml index adb004298d..027586c381 100644 --- a/resources/qml/PrintMonitor.qml +++ b/resources/qml/PrintMonitor.qml @@ -132,8 +132,6 @@ ScrollView key: "material_bed_temperature" watchedProperties: ["value", "minimum_value", "maximum_value", "resolve"] storeIndex: 0 - - property var resolve: Cura.MachineManager.activeStack != Cura.MachineManager.activeMachine ? properties.resolve : "None" } UM.SettingPropertyProvider diff --git a/resources/qml/PrinterOutput/ExtruderBox.qml b/resources/qml/PrinterOutput/ExtruderBox.qml index e567d5d4cb..46deec29ef 100644 --- a/resources/qml/PrinterOutput/ExtruderBox.qml +++ b/resources/qml/PrinterOutput/ExtruderBox.qml @@ -25,8 +25,6 @@ Item key: "material_print_temperature" watchedProperties: ["value", "minimum_value", "maximum_value", "resolve"] storeIndex: 0 - - property var resolve: Cura.MachineManager.activeStack != Cura.MachineManager.activeMachine ? properties.resolve : "None" } Rectangle diff --git a/resources/qml/PrinterOutput/HeatedBedBox.qml b/resources/qml/PrinterOutput/HeatedBedBox.qml index 172606c56d..5323072567 100644 --- a/resources/qml/PrinterOutput/HeatedBedBox.qml +++ b/resources/qml/PrinterOutput/HeatedBedBox.qml @@ -199,17 +199,7 @@ Item { return ""; } - if ((bedTemperature.resolve != "None" && bedTemperature.resolve) && (bedTemperature.stackLevels[0] != 0) && (bedTemperature.stackLevels[0] != 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). - return bedTemperature.resolve; - } - else - { - return bedTemperature.properties.value; - } + return bedTemperature.properties.value; } } }