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:
Ghostkeeper 2018-03-20 13:22:18 +01:00
parent d4d9a58d04
commit 877032584e
No known key found for this signature in database
GPG key ID: 5252B696FB5E7C7A

View file

@ -460,13 +460,13 @@ Item
visible: printerModel != null ? printerModel.canSendRawGcode: true
enabled: {
if (printerModel == null) {
return false // Can't preheat if not connected
return false // Can't send custom commands 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 false // Printer is in a state where it can't react to custom commands.
}
return true
}