mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-11 00:37:50 -06:00
Correct documentation
This code was obviously copied from the pre-heat functionality. Let's fix the code duplication next as far as possible. Contributes to issue CURA-4879.
This commit is contained in:
parent
d4d9a58d04
commit
877032584e
1 changed files with 2 additions and 2 deletions
|
@ -460,13 +460,13 @@ Item
|
||||||
visible: printerModel != null ? printerModel.canSendRawGcode: true
|
visible: printerModel != null ? printerModel.canSendRawGcode: true
|
||||||
enabled: {
|
enabled: {
|
||||||
if (printerModel == null) {
|
if (printerModel == null) {
|
||||||
return false // Can't preheat if not connected
|
return false // Can't send custom commands if not connected.
|
||||||
}
|
}
|
||||||
if (!connectedPrinter.acceptsCommands) {
|
if (!connectedPrinter.acceptsCommands) {
|
||||||
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.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 false // Printer is in a state where it can't react to custom commands.
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue