mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 23:17:32 -06:00
Remove definitionChanges before removing a printer
When removing a printer, the files in %appdata%/cura/<version>/ /definition_changes/ remained intact. This commit fixes that by making sure that the definitionChanges are removed before removing the machine.
This commit is contained in:
parent
c6af6565a3
commit
8c6a7d3098
2 changed files with 3 additions and 0 deletions
|
@ -302,6 +302,7 @@ class ExtruderManager(QObject):
|
|||
|
||||
for extruder in self.getMachineExtruders(machine_id):
|
||||
ContainerRegistry.getInstance().removeContainer(extruder.userChanges.getId())
|
||||
ContainerRegistry.getInstance().removeContainer(extruder.definitionChanges.getId())
|
||||
ContainerRegistry.getInstance().removeContainer(extruder.getId())
|
||||
if machine_id in self._extruder_trains:
|
||||
del self._extruder_trains[machine_id]
|
||||
|
|
|
@ -720,6 +720,8 @@ class MachineManager(QObject):
|
|||
containers = CuraContainerRegistry.getInstance().findInstanceContainersMetadata(type = "user", machine = machine_id)
|
||||
for container in containers:
|
||||
CuraContainerRegistry.getInstance().removeContainer(container["id"])
|
||||
machine_stack = CuraContainerRegistry.getInstance().findContainerStacks(type = "machine", name = machine_id)[0]
|
||||
CuraContainerRegistry.getInstance().removeContainer(machine_stack.definitionChanges.getId())
|
||||
CuraContainerRegistry.getInstance().removeContainer(machine_id)
|
||||
|
||||
# If the printer that is being removed is a network printer, the hidden printers have to be also removed
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue