mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 03:38:59 +08:00
Remove only the hidden printers when removing a printers
When printers share the same group_id, they are removed, regardless if they are hidden or not. This was resulting in sometimes removing multiple printers when removing a printer that was created by a project file. This PR fixes that by actually checking whether the printer to be removed is hidden. CURA-7522
This commit is contained in:
parent
c810ae97a7
commit
364769d821
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user