Fix error message when not connected in preheatUpdateTimer

Can't get preheatBedRemainingTime from null.

Contributes to issue CURA-3161.
This commit is contained in:
Ghostkeeper 2017-02-16 12:48:17 +01:00
parent b002e367e3
commit 140d5204c3
No known key found for this signature in database
GPG key ID: C5F96EE2BC0F7E75

View file

@ -268,7 +268,7 @@ Column
{
id: preheatUpdateTimer
interval: 100 //Update every 100ms. You want to update every 1s, but then you have one timer for the updating running out of sync with the actual date timer and you might skip seconds.
running: connectedPrinter.preheatBedRemainingTime != ""
running: connectedPrinter != null && connectedPrinter.preheatBedRemainingTime != ""
repeat: true
onTriggered: update()
property var endTime: new Date() //Set initial endTime to be the current date, so that the endTime has initially already passed and the timer text becomes invisible if you were to update.