CURA-4450 Updating UI after removing printer

When removing a printer, the new one was activated but not signals were
emitted so the UI didn't update correctly. Now the printer is added and
signals are emitted.
This commit is contained in:
Diego Prado Gesto 2017-10-13 13:06:48 +02:00
parent 4c4de2cf1a
commit 3ea9c3856c

View File

@ -1096,7 +1096,7 @@ class MachineManager(QObject):
machine_stacks = ContainerRegistry.getInstance().findContainerStacks(type = "machine")
other_machine_stacks = [s for s in machine_stacks if s.getId() != machine_id]
if other_machine_stacks:
Application.getInstance().setGlobalContainerStack(other_machine_stacks[0])
self.setActiveMachine(other_machine_stacks[0].getId())
ExtruderManager.getInstance().removeMachineExtruders(machine_id)
containers = ContainerRegistry.getInstance().findInstanceContainers(type = "user", machine = machine_id)