Disable preheat button if printer is busy

It is allowed to preheat the bed if the printer is waiting for the bed to clean up or for stuff to cool down after a print.

Contributes to issue CURA-3161.
This commit is contained in:
Ghostkeeper 2017-02-08 10:18:21 +01:00
parent 2cdf06413b
commit 34f929c9df
No known key found for this signature in database
GPG key ID: C5F96EE2BC0F7E75

View file

@ -337,6 +337,10 @@ Column
{
return false; //Can't preheat if not connected.
}
if (connectedPrinter.jobState == "printing" || connectedPrinter.jobState == "pre_print" || connectedPrinter.jobState == "pausing" || connectedPrinter.jobState == "resuming" || connectedPrinter.jobState == "error" || connectedPrinter.jobState == "offline")
{
return false; //Printer is in a state where it can't react to pre-heating.
}
if (preheatCountdownTimer.running)
{
return true; //Can always cancel if the timer is running.