mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-09 07:56:22 -06:00
Don't disable pre-heat text if temperature is invalid
Otherwise you can't change the temperature to make it valid again... Contributes to issue CURA-3161.
This commit is contained in:
parent
84f695821d
commit
253b4bce03
1 changed files with 18 additions and 11 deletions
|
@ -187,7 +187,22 @@ Column
|
||||||
{
|
{
|
||||||
id: preheatTemperatureControl
|
id: preheatTemperatureControl
|
||||||
color: !enabled ? UM.Theme.getColor("setting_control_disabled") : UM.Theme.getColor("setting_validation_ok")
|
color: !enabled ? UM.Theme.getColor("setting_control_disabled") : UM.Theme.getColor("setting_validation_ok")
|
||||||
enabled: preheatButton.enabled
|
enabled:
|
||||||
|
{
|
||||||
|
if (connectedPrinter == null)
|
||||||
|
{
|
||||||
|
return false; //Can't preheat if not connected.
|
||||||
|
}
|
||||||
|
if (!connectedPrinter.acceptsCommands)
|
||||||
|
{
|
||||||
|
return false; //Not allowed to do anything.
|
||||||
|
}
|
||||||
|
if (connectedPrinter.jobState == "printing" || connectedPrinter.jobState == "pre_print" || connectedPrinter.jobState == "resuming" || connectedPrinter.jobState == "pausing" || connectedPrinter.jobState == "paused" || connectedPrinter.jobState == "error" || connectedPrinter.jobState == "offline")
|
||||||
|
{
|
||||||
|
return false; //Printer is in a state where it can't react to pre-heating.
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
border.width: UM.Theme.getSize("default_lining").width
|
border.width: UM.Theme.getSize("default_lining").width
|
||||||
border.color: !enabled ? UM.Theme.getColor("setting_control_disabled_border") : mouseArea.containsMouse ? UM.Theme.getColor("setting_control_border_highlight") : UM.Theme.getColor("setting_control_border")
|
border.color: !enabled ? UM.Theme.getColor("setting_control_disabled_border") : mouseArea.containsMouse ? UM.Theme.getColor("setting_control_border_highlight") : UM.Theme.getColor("setting_control_border")
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
|
@ -305,17 +320,9 @@ Column
|
||||||
height: UM.Theme.getSize("setting_control").height
|
height: UM.Theme.getSize("setting_control").height
|
||||||
enabled:
|
enabled:
|
||||||
{
|
{
|
||||||
if (connectedPrinter == null)
|
if (!preheatTemperatureControl.enabled)
|
||||||
{
|
{
|
||||||
return false; //Can't preheat if not connected.
|
return false; //Not connected, not authenticated or printer is busy.
|
||||||
}
|
|
||||||
if (!connectedPrinter.acceptsCommands)
|
|
||||||
{
|
|
||||||
return false; //Not allowed to do anything.
|
|
||||||
}
|
|
||||||
if (connectedPrinter.jobState == "printing" || connectedPrinter.jobState == "pre_print" || connectedPrinter.jobState == "resuming" || connectedPrinter.jobState == "pausing" || connectedPrinter.jobState == "paused" || connectedPrinter.jobState == "error" || connectedPrinter.jobState == "offline")
|
|
||||||
{
|
|
||||||
return false; //Printer is in a state where it can't react to pre-heating.
|
|
||||||
}
|
}
|
||||||
if (preheatUpdateTimer.running)
|
if (preheatUpdateTimer.running)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue