mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-06-04 11:14:21 +08:00
No longer select last_entry that isn't in the list
CURA-2860
This commit is contained in:
parent
1bc0fdebc9
commit
75e067cab7
@ -168,12 +168,16 @@ class SettingInheritanceManager(QObject):
|
|||||||
if value is not None:
|
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
|
# 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
|
has_setting_function = isinstance(value, UM.Settings.SettingFunction) and len(value.getUsedSettingKeys()) > 0
|
||||||
|
if key == "prime_tower_size":
|
||||||
|
print(container.getId())
|
||||||
if has_setting_function is False:
|
if has_setting_function is False:
|
||||||
has_non_function_value = True
|
has_non_function_value = True
|
||||||
continue
|
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.
|
||||||
|
if key == "prime_tower_size":
|
||||||
|
print("YAY", has_setting_function, has_non_function_value)
|
||||||
return has_setting_function and has_non_function_value
|
return has_setting_function and has_non_function_value
|
||||||
|
|
||||||
def _update(self):
|
def _update(self):
|
||||||
|
@ -227,7 +227,7 @@ Item {
|
|||||||
focus = true;
|
focus = true;
|
||||||
|
|
||||||
// Get the most shallow function value (eg not a number) that we can find.
|
// Get the most shallow function value (eg not a number) that we can find.
|
||||||
var last_entry = propertyProvider.stackLevels[propertyProvider.stackLevels.length]
|
var last_entry = propertyProvider.stackLevels[propertyProvider.stackLevels.length - 1]
|
||||||
for (var i = 1; i < base.stackLevels.length; i++)
|
for (var i = 1; i < base.stackLevels.length; i++)
|
||||||
{
|
{
|
||||||
var has_setting_function = typeof(propertyProvider.getPropertyValue("value", base.stackLevels[i])) == "object";
|
var has_setting_function = typeof(propertyProvider.getPropertyValue("value", base.stackLevels[i])) == "object";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user