fix: do not display default value with default_value_makes_sense set to False

This commit is contained in:
egarette@silique.fr 2025-02-17 09:53:32 +01:00
parent a8f8c35bdc
commit 008a9fbc3d

View file

@ -299,6 +299,7 @@ class OutputFamily:
elif "advanced" in properties: elif "advanced" in properties:
variable_color = self.root.variable_advanced_and_modified_color variable_color = self.root.variable_advanced_and_modified_color
color = None color = None
if option.information.get("default_value_makes_sense", True):
try: try:
default_value = option.value.default() default_value = option.value.default()
except ConfigError: except ConfigError:
@ -311,6 +312,8 @@ class OutputFamily:
default_value = default_value[leader_index] default_value = default_value[leader_index]
else: else:
default_value = None default_value = None
else:
default_value = None
if value is undefined: if value is undefined:
value = option.value.get() value = option.value.get()
key = self.colorize( key = self.colorize(