Don't check for min/max temperature if we have no min/max

If we have no minimum/maximum bed temperature, the property returns 'None'.

Contributes to issue CURA-3161.
This commit is contained in:
Ghostkeeper 2017-02-07 17:33:59 +01:00
parent e9b30daad6
commit 0b10df01b0
No known key found for this signature in database
GPG key ID: C5F96EE2BC0F7E75

View file

@ -340,11 +340,11 @@ Column
{
return true; //Can always cancel if the timer is running.
}
if (parseInt(preheatTemperatureInput.text) < parseInt(bedTemperature.properties.minimum_value))
if (bedTemperature.properties.minimum_value != "None" && parseInt(preheatTemperatureInput.text) < parseInt(bedTemperature.properties.minimum_value))
{
return false; //Target temperature too low.
}
if (parseInt(preheatTemperatureInput.text) > parseInt(bedTemperature.properties.maximum_value))
if (bedTemperature.properties.maximum_value != "None" && parseInt(preheatTemperatureInput.text) > parseInt(bedTemperature.properties.maximum_value))
{
return false; //Target temperature too high.
}