mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 20:39:01 +08:00
InheritanceManager now checks if a setting function can actually change before labeling it
CURA-2860
This commit is contained in:
parent
ed5244bcb0
commit
867463f718
@ -163,13 +163,15 @@ class SettingInheritanceManager(QObject):
|
|||||||
for container in containers:
|
for container in containers:
|
||||||
try:
|
try:
|
||||||
value = container.getProperty(key, "value")
|
value = container.getProperty(key, "value")
|
||||||
if value is not None:
|
|
||||||
has_setting_function = isinstance(value, UM.Settings.SettingFunction)
|
|
||||||
if has_setting_function is False:
|
|
||||||
has_non_function_value = True
|
|
||||||
continue
|
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
continue
|
continue
|
||||||
|
if value is not None:
|
||||||
|
# If a setting doesn't use any keys, it won't change it's value, so treat it as if it's a fixed value
|
||||||
|
has_setting_function = isinstance(value, UM.Settings.SettingFunction) and len(value.getUsedSettingKeys()) > 0
|
||||||
|
if has_setting_function is False:
|
||||||
|
has_non_function_value = True
|
||||||
|
continue
|
||||||
|
|
||||||
if has_setting_function:
|
if has_setting_function:
|
||||||
break # There is a setting function somewhere, stop looking deeper.
|
break # There is a setting function somewhere, stop looking deeper.
|
||||||
return has_setting_function and has_non_function_value
|
return has_setting_function and has_non_function_value
|
||||||
|
Loading…
x
Reference in New Issue
Block a user