From a9813146c4bc2aa689c52e31a9f64ae579f659d9 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 8 May 2017 12:30:15 +0200 Subject: [PATCH] Evaluate global stack first The global stack has 99% of all settings. So most of the times the setting definition we are looking for is here. This should make it a bit faster to find. Contributes to issue CURA-3772. --- plugins/CuraEngineBackend/CuraEngineBackend.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index 7f902a49bc..d0f26f429e 100755 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -274,7 +274,7 @@ class CuraEngineBackend(QObject, Backend): error_keys = self._global_container_stack.getErrorKeys() error_labels = set() for key in error_keys: - for stack in extruders + [self._global_container_stack]: #Search all container stacks for the definition of this setting. Some are only in an extruder stack. + for stack in [self._global_container_stack] + extruders: #Search all container stacks for the definition of this setting. Some are only in an extruder stack. definitions = stack.getBottom().findDefinitions(key = key) if definitions: break #Found it! No need to continue search.