Prevent qml warning when no printer is connected

This commit is contained in:
fieldOfView 2016-08-20 23:42:51 +02:00
parent 2f3f57c43d
commit 7efde6b164

View file

@ -235,12 +235,12 @@ Rectangle
text: {
var result = "";
var jobState = Cura.MachineManager.printerOutputDevices[0].jobState;
if (!printerConnected) {
return "";
}
if (lastJobState !== jobState) {
var jobState = Cura.MachineManager.printerOutputDevices[0].jobState;
if (lastJobState != jobState) {
// the userClicked message must disappear when an "automated" jobState comes by
userClicked = false;
lastJobState = jobState;