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.
This commit is contained in:
Ghostkeeper 2017-05-08 12:30:15 +02:00
parent 281a01dd1f
commit a9813146c4
No known key found for this signature in database
GPG key ID: C5F96EE2BC0F7E75

View file

@ -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.