mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07: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
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue