Browse Source

Revert "Prevent abstract machines from being deleted in the config menu"

This reverts commit 27fc11b8404ed84a9b95b2fdddab239d2cd3c93b.
c.lamboo 2 years ago
parent
commit
b6a461bd08

+ 1 - 2
cura/Machines/Models/GlobalStacksModel.py

@@ -172,7 +172,6 @@ class GlobalStacksModel(ListModel):
                           "metadata": container_stack.getMetaData().copy(),
                           "discoverySource": section_name,
                           "removalWarning": removal_warning,
-                          "isOnline": is_online,
-                          "isAbstractMachine": is_abstract_machine})
+                          "isOnline": is_online})
         items.sort(key=lambda i: (not i["hasRemoteConnection"], i["name"]))
         self.setItems(items)

+ 2 - 2
resources/qml/Preferences/MachinesPage.qml

@@ -17,7 +17,7 @@ UM.ManagementPage
     title: catalog.i18nc("@title:tab", "Printers")
     detailsPlaneCaption: base.currentItem && base.currentItem.name ? base.currentItem.name : ""
 
-    model: Cura.GlobalStacksModel { }
+    model: Cura.GlobalStacksModel { filterAbstractMachines: false }
 
     sectionRole: "discoverySource"
 
@@ -139,7 +139,7 @@ UM.ManagementPage
             Cura.MenuItem
             {
                 text: catalog.i18nc("@action:button", "Remove")
-                enabled: base.currentItem != null && model.count > 1 && !base.currentItem.isAbstractMachine
+                enabled: base.currentItem != null && model.count > 1
                 onTriggered: confirmDialog.open()
             }
             Cura.MenuItem