mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 04:36:01 +08:00
Instead of emitting signals for all containers, only emit them for top
This significantly speeds up project loading. CURA-1263
This commit is contained in:
parent
a1acfe167c
commit
db18635049
@ -412,16 +412,13 @@ class ThreeMFWorkspaceReader(WorkspaceReader):
|
|||||||
ExtruderManager.getInstance().registerExtruder(None, global_stack.getId())
|
ExtruderManager.getInstance().registerExtruder(None, global_stack.getId())
|
||||||
|
|
||||||
Logger.log("d", "Workspace loading is notifying rest of the code of changes...")
|
Logger.log("d", "Workspace loading is notifying rest of the code of changes...")
|
||||||
# Notify everything/one that is to notify about changes.
|
|
||||||
for container in global_stack.getContainers():
|
|
||||||
global_stack.containersChanged.emit(container)
|
|
||||||
|
|
||||||
Job.yieldThread()
|
# Notify everything/one that is to notify about changes.
|
||||||
|
global_stack.containersChanged.emit(global_stack.getTop())
|
||||||
|
|
||||||
for stack in extruder_stacks:
|
for stack in extruder_stacks:
|
||||||
stack.setNextStack(global_stack)
|
stack.setNextStack(global_stack)
|
||||||
for container in stack.getContainers():
|
stack.containersChanged.emit(stack.getTop())
|
||||||
stack.containersChanged.emit(container)
|
|
||||||
Job.yieldThread()
|
|
||||||
|
|
||||||
# Actually change the active machine.
|
# Actually change the active machine.
|
||||||
Application.getInstance().setGlobalContainerStack(global_stack)
|
Application.getInstance().setGlobalContainerStack(global_stack)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user