mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-13 01:37:51 -06:00
Don't emit changed signals if the global stack ID doesn't exist
Because nothing will change then. This is equivalent to putting the call to self.__emitChangedSignals() in the if-statement. But I switched the condition of the if-statement around because it looks more like error handling to me. This is the main case. Contributes to issue CURA-5045.
This commit is contained in:
parent
75e993eb60
commit
f2c8d8756e
1 changed files with 10 additions and 8 deletions
|
@ -326,7 +326,9 @@ class MachineManager(QObject):
|
||||||
container_registry = ContainerRegistry.getInstance()
|
container_registry = ContainerRegistry.getInstance()
|
||||||
|
|
||||||
containers = container_registry.findContainerStacks(id = stack_id)
|
containers = container_registry.findContainerStacks(id = stack_id)
|
||||||
if containers:
|
if not containers:
|
||||||
|
return
|
||||||
|
|
||||||
global_stack = containers[0]
|
global_stack = containers[0]
|
||||||
ExtruderManager.getInstance().setActiveExtruderIndex(0) # Switch to first extruder
|
ExtruderManager.getInstance().setActiveExtruderIndex(0) # Switch to first extruder
|
||||||
self._global_container_stack = global_stack
|
self._global_container_stack = global_stack
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue