From be4357c6355f1010165bdf4a29c84f2ed84c7a98 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 4 Sep 2018 13:45:16 +0200 Subject: [PATCH] Show different state when printer is disabled CL-896 --- plugins/UM3NetworkPrinting/ClusterControlItem.qml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/plugins/UM3NetworkPrinting/ClusterControlItem.qml b/plugins/UM3NetworkPrinting/ClusterControlItem.qml index 3a0c37e830..3ab2a2411e 100644 --- a/plugins/UM3NetworkPrinting/ClusterControlItem.qml +++ b/plugins/UM3NetworkPrinting/ClusterControlItem.qml @@ -192,7 +192,18 @@ Component Label { id: activeJobLabel - text: modelData.activePrintJob != null ? modelData.activePrintJob.name : "waiting" + text: + { + if (modelData.state == "disabled") + { + return catalog.i18nc("@label", "Not available") + } + if (modelData.activePrintJob != null) + { + return modelData.activePrintJob.name + } + return catalog.i18nc("@label", "Waiting") + } anchors.top: machineNameLabel.bottom width: parent.width elide: Text.ElideRight