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.
This commit is contained in:
Ghostkeeper 2022-06-14 15:59:54 +02:00
parent e095d41f0b
commit 83ea5c2944
No known key found for this signature in database
GPG Key ID: D2A8871EE34EC59A

View File

@ -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
{