mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 04:36:01 +08: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
@ -326,7 +326,9 @@ class MachineManager(QObject):
|
||||
container_registry = ContainerRegistry.getInstance()
|
||||
|
||||
containers = container_registry.findContainerStacks(id = stack_id)
|
||||
if containers:
|
||||
if not containers:
|
||||
return
|
||||
|
||||
global_stack = containers[0]
|
||||
ExtruderManager.getInstance().setActiveExtruderIndex(0) # Switch to first extruder
|
||||
self._global_container_stack = global_stack
|
||||
|
Loading…
x
Reference in New Issue
Block a user