Merge pull request #7947 from Ultimaker/CURA-7522_Removing_printer_created_by_projectfile_removes_original_printer

CURA-7522: Removing printer created by project file also removes the original printer
This commit is contained in:
Nino van Hooff 2020-06-19 16:39:03 +02:00 committed by GitHub
commit 5e921698b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -745,7 +745,7 @@ class MachineManager(QObject):
# If the printer that is being removed is a network printer, the hidden printers have to be also removed
group_id = metadata.get("group_id", None)
if group_id:
metadata_filter = {"group_id": group_id}
metadata_filter = {"group_id": group_id, "hidden": True}
hidden_containers = CuraContainerRegistry.getInstance().findContainerStacks(type = "machine", **metadata_filter)
if hidden_containers:
# This reuses the method and remove all printers recursively