mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-12 17:27:51 -06:00
Prevent abstract machines from being deleted in the config menu
CURA-9277
This commit is contained in:
parent
8bb2671a28
commit
27fc11b840
2 changed files with 4 additions and 3 deletions
|
@ -172,6 +172,7 @@ class GlobalStacksModel(ListModel):
|
|||
"metadata": container_stack.getMetaData().copy(),
|
||||
"discoverySource": section_name,
|
||||
"removalWarning": removal_warning,
|
||||
"isOnline": is_online})
|
||||
"isOnline": is_online,
|
||||
"isAbstractMachine": is_abstract_machine})
|
||||
items.sort(key=lambda i: (not i["hasRemoteConnection"], i["name"]))
|
||||
self.setItems(items)
|
||||
|
|
|
@ -17,7 +17,7 @@ UM.ManagementPage
|
|||
title: catalog.i18nc("@title:tab", "Printers")
|
||||
detailsPlaneCaption: base.currentItem && base.currentItem.name ? base.currentItem.name : ""
|
||||
|
||||
model: Cura.GlobalStacksModel { filterAbstractMachines: false }
|
||||
model: Cura.GlobalStacksModel { }
|
||||
|
||||
sectionRole: "discoverySource"
|
||||
|
||||
|
@ -139,7 +139,7 @@ UM.ManagementPage
|
|||
Cura.MenuItem
|
||||
{
|
||||
text: catalog.i18nc("@action:button", "Remove")
|
||||
enabled: base.currentItem != null && model.count > 1
|
||||
enabled: base.currentItem != null && model.count > 1 && !base.currentItem.isAbstractMachine
|
||||
onTriggered: confirmDialog.open()
|
||||
}
|
||||
Cura.MenuItem
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue