Browse Source

Implement Delete All in roasting schedule

Neal Wilson 6 years ago
parent
commit
e568f50eae
1 changed files with 9 additions and 0 deletions
  1. 9
    0
      config/Windows/schedule.xml

+ 9
- 0
config/Windows/schedule.xml View File

@@ -480,6 +480,15 @@
480 480
     notifier.notify.connect(function() {
481 481
         batches.setQuery("SELECT id, (SELECT name FROM items WHERE id = (data#>>'{roasted}')::numeric), (data#>>'{green_weight}')::numeric FROM scheduled_roasts WHERE machine IS NULL");
482 482
     });
483
+    var deleteall = findChildObject(this, 'deleteall');
484
+    deleteall.triggered.connect(function() {
485
+        var query = QSqlQuery();
486
+        query.exec("DELETE FROM scheduled_roasts WHERE machine IS NULL");
487
+        query = query.invalidate();
488
+        editingstack.setCurrentIndex(0);
489
+        saved = false;
490
+        deletebutton.enabled = false;
491
+    });
483 492
 ]]>
484 493
     </program>
485 494
 </window>

Loading…
Cancel
Save