From b6a461bd08d0e5f5a471586e1e1212e0187439f6 Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Mon, 5 Sep 2022 17:32:23 +0200 Subject: [PATCH] Revert "Prevent abstract machines from being deleted in the config menu" This reverts commit 27fc11b8404ed84a9b95b2fdddab239d2cd3c93b. --- cura/Machines/Models/GlobalStacksModel.py | 3 +-- resources/qml/Preferences/MachinesPage.qml | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/cura/Machines/Models/GlobalStacksModel.py b/cura/Machines/Models/GlobalStacksModel.py index 62b470daee..69f2ec3822 100644 --- a/cura/Machines/Models/GlobalStacksModel.py +++ b/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) diff --git a/resources/qml/Preferences/MachinesPage.qml b/resources/qml/Preferences/MachinesPage.qml index 16f144cf85..258b45292e 100644 --- a/resources/qml/Preferences/MachinesPage.qml +++ b/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