mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 22:49:01 +08:00
Fix disabling preheat button when printer is not idle
This commit is contained in:
parent
13206e1fdc
commit
f135b1675c
@ -130,9 +130,12 @@ Item
|
|||||||
{
|
{
|
||||||
return false; //Not allowed to do anything.
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
@ -144,7 +147,7 @@ Item
|
|||||||
anchors.bottomMargin: UM.Theme.getSize("default_margin").height
|
anchors.bottomMargin: UM.Theme.getSize("default_margin").height
|
||||||
width: UM.Theme.getSize("monitor_preheat_temperature_control").width
|
width: UM.Theme.getSize("monitor_preheat_temperature_control").width
|
||||||
height: UM.Theme.getSize("monitor_preheat_temperature_control").height
|
height: UM.Theme.getSize("monitor_preheat_temperature_control").height
|
||||||
visible: extruderModel != null ? extruderModel.canPreHeatHotends && !extruderModel.isPreheating : true
|
visible: extruderModel != null ? enabled && extruderModel.canPreHeatHotends && !extruderModel.isPreheating : true
|
||||||
Rectangle //Highlight of input field.
|
Rectangle //Highlight of input field.
|
||||||
{
|
{
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
@ -114,9 +114,12 @@ Item
|
|||||||
{
|
{
|
||||||
return false; //Not allowed to do anything.
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
@ -128,7 +131,7 @@ Item
|
|||||||
anchors.bottomMargin: UM.Theme.getSize("default_margin").height
|
anchors.bottomMargin: UM.Theme.getSize("default_margin").height
|
||||||
width: UM.Theme.getSize("monitor_preheat_temperature_control").width
|
width: UM.Theme.getSize("monitor_preheat_temperature_control").width
|
||||||
height: UM.Theme.getSize("monitor_preheat_temperature_control").height
|
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.
|
Rectangle //Highlight of input field.
|
||||||
{
|
{
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
Loading…
x
Reference in New Issue
Block a user