Просмотр исходного кода

Display "move to top" button in monitor page

CURA-9940
c.lamboo 2 лет назад
Родитель
Сommit
ca290a32fb
1 измененных файлов с 1 добавлено и 7 удалено
  1. 1 7
      plugins/UM3NetworkPrinting/resources/qml/MonitorContextMenu.qml

+ 1 - 7
plugins/UM3NetworkPrinting/resources/qml/MonitorContextMenu.qml

@@ -23,7 +23,7 @@ Item
     //So compute here the visibility of the menu items, so that we can use it for the visibility of the button.
     property bool sendToTopVisible:
     {
-        if (printJob && printJob.state in ("queued",  "error") && !isAssigned(printJob)) {
+        if (printJob && (printJob.state == "queued" || printJob.state == "error")) {
             if (OutputDevice && OutputDevice.queuedPrintJobs[0] && OutputDevice.canWriteOthersPrintJobs) {
                 return OutputDevice.queuedPrintJobs[0].key != printJob.key;
             }
@@ -246,10 +246,4 @@ Item
     function close() {
         popUp.close()
     }
-    function isAssigned(job) {
-        if (!job) {
-            return false;
-        }
-        return job.assignedPrinter ? true : false;
-    }
 }