mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Moved check for top container setting function up in the code
Should improve performance a bit. CURA-2361
This commit is contained in:
parent
642b6b1ca3
commit
75c788c31a
1 changed files with 5 additions and 2 deletions
|
@ -128,6 +128,10 @@ class SettingInheritanceManager(QObject):
|
|||
if not self._active_container_stack.getProperty(key, "enabled"):
|
||||
return False
|
||||
|
||||
## Also check if the top container is not a setting function (this happens if the inheritance is restored).
|
||||
if isinstance(self._active_container_stack.getTop().getProperty(key, "value"), UM.Settings.SettingFunction):
|
||||
return False
|
||||
|
||||
## Mash all containers for all the stacks together.
|
||||
while stack:
|
||||
containers.extend(stack.getContainers())
|
||||
|
@ -146,8 +150,7 @@ class SettingInheritanceManager(QObject):
|
|||
if has_setting_function:
|
||||
break # There is a setting function somewhere, stop looking deeper.
|
||||
|
||||
## Also check if the top container is not a setting function (this happens if the inheritance is restored).
|
||||
return has_setting_function and not isinstance(self._active_container_stack.getTop().getProperty(key, "value"), UM.Settings.SettingFunction) and has_non_function_value
|
||||
return has_setting_function and has_non_function_value
|
||||
|
||||
def _update(self):
|
||||
self._settings_with_inheritance_warning = [] # Reset previous data.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue