From 83ea5c29442c2efc4e0a97e9fb4ef2e8a27b8bc4 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 14 Jun 2022 15:59:54 +0200 Subject: Fix triggering first pulse Before the first pulse, the _previousResolution property was still bound to the activeQualityType property of the MachineManager. When it then checks if it changed, it finds that it didn't change because it checks against that same property, but the _previousResolution automatically updated with it. After that it loses its binding because it's set in the function itself to a fixed value. Instead, we'll now give it its initial value with the Component.onCompleted function so that it doesn't bind, and then doesn't change along with the first change. Contributes to issue CURA-8849. --- .../PrintSetupSelector/Recommended/RecommendedResolutionSelector.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'resources/qml') diff --git a/resources/qml/PrintSetupSelector/Recommended/RecommendedResolutionSelector.qml b/resources/qml/PrintSetupSelector/Recommended/RecommendedResolutionSelector.qml index 62cdf94185..c69b4dbd13 100644 --- a/resources/qml/PrintSetupSelector/Recommended/RecommendedResolutionSelector.qml +++ b/resources/qml/PrintSetupSelector/Recommended/RecommendedResolutionSelector.qml @@ -12,7 +12,8 @@ Item height: childrenRect.height property real labelColumnWidth: Math.round(width / 3) - property string _previousResolution: Cura.MachineManager.activeQualityType //Internal variable to detect changes. + property string _previousResolution: "" //Internal variable to detect changes. + Component.onCompleted: _previousResolution = Cura.MachineManager.activeQualityType; Cura.IconWithText { -- cgit v1.2.3