mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-06 05:23:58 -06:00
Fix disabling preheat button when printer is not idle
This commit is contained in:
parent
13206e1fdc
commit
f135b1675c
2 changed files with 12 additions and 6 deletions
|
@ -114,9 +114,12 @@ Item
|
|||
{
|
||||
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")
|
||||
if (connectedPrinter.activePrinter && connectedPrinter.activePrinter.activePrintJob)
|
||||
{
|
||||
return false; //Printer is in a state where it can't react to pre-heating.
|
||||
if((["printing", "pre_print", "resuming", "pausing", "paused", "error", "offline"]).indexOf(connectedPrinter.activePrinter.activePrintJob.state) != -1)
|
||||
{
|
||||
return false; //Printer is in a state where it can't react to pre-heating.
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -128,7 +131,7 @@ Item
|
|||
anchors.bottomMargin: UM.Theme.getSize("default_margin").height
|
||||
width: UM.Theme.getSize("monitor_preheat_temperature_control").width
|
||||
height: UM.Theme.getSize("monitor_preheat_temperature_control").height
|
||||
visible: printerModel != null ? printerModel.canPreHeatBed && !printerModel.isPreheating : true
|
||||
visible: printerModel != null ? enabled && printerModel.canPreHeatBed && !printerModel.isPreheating : true
|
||||
Rectangle //Highlight of input field.
|
||||
{
|
||||
anchors.fill: parent
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue