mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 22:58:58 +08:00
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.
This commit is contained in:
parent
d363736fdd
commit
9a5b355f2b
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user