mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-19 12:47:49 -06:00
SettingItem now uses settingInheritanceManager for visibility check
CURA-2361
This commit is contained in:
parent
e282e35b9c
commit
e3d78c17ea
1 changed files with 3 additions and 13 deletions
|
@ -196,19 +196,9 @@ Item {
|
||||||
// - This setting item uses inherit button at all
|
// - This setting item uses inherit button at all
|
||||||
// - The type of the value of any deeper container is an "object" (eg; is a function)
|
// - The type of the value of any deeper container is an "object" (eg; is a function)
|
||||||
visible:
|
visible:
|
||||||
{
|
{
|
||||||
var state = base.state == "InstanceState.User";
|
return showInheritButton && Cura.SettingInheritanceManager.settingsWithInheritanceWarning.indexOf(definition.key) >= 0;
|
||||||
var has_setting_function = false;
|
}
|
||||||
for (var i = 1; i < base.stackLevels.length; i++)
|
|
||||||
{
|
|
||||||
has_setting_function = typeof(propertyProvider.getPropertyValue("value", base.stackLevels[i])) == "object";
|
|
||||||
if(has_setting_function)
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return state && base.showInheritButton && has_setting_function && typeof(propertyProvider.getPropertyValue("value", base.stackLevels[0])) != "object"
|
|
||||||
}
|
|
||||||
|
|
||||||
height: parent.height;
|
height: parent.height;
|
||||||
width: height;
|
width: height;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue