From 9a5b355f2b1519e150c7ee136478827a17a5302a Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 16 Feb 2017 11:03:37 +0100 Subject: [PATCH] Make countdown visibility dependent on its own text No need to 'update' that in the update timer. We can just link it and it updates on its own. Contributes to issue CURA-3161. --- resources/qml/PrintMonitor.qml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/resources/qml/PrintMonitor.qml b/resources/qml/PrintMonitor.qml index 64e44d829d..e5942d1c31 100644 --- a/resources/qml/PrintMonitor.qml +++ b/resources/qml/PrintMonitor.qml @@ -291,12 +291,10 @@ Column preheatCountdown.text = "" if (connectedPrinter != null) { - preheatCountdown.visible = true; preheatCountdown.text = connectedPrinter.preheatBedRemainingTime; } if (preheatCountdown.text == "") //Either time elapsed or not connected. { - preheatCountdown.visible = false; stop(); } } @@ -304,8 +302,8 @@ Column Label { id: preheatCountdown - text: "0:00" - visible: false //It only becomes visible when the timer is running. + text: "" + visible: text != "" //Has no direct effect, but just so that we can link visibility of clock icon to visibility of the countdown text. font: UM.Theme.getFont("default") color: UM.Theme.getColor("text") anchors.right: preheatButton.left