fix some bug

This commit is contained in:
QIDI TECH
2025-05-24 10:17:38 +08:00
parent b68290818e
commit 6d0ec79031
2 changed files with 10 additions and 9 deletions

View File

@@ -2605,14 +2605,13 @@ const Preset* PresetCollection::get_preset_parent(const Preset& child) const
const Preset *PresetCollection::get_preset_base(const Preset &child) const
{
//y60
//if (child.is_system || child.is_default)
// return &child;
//// Handle user preset
//if (child.inherits().empty())
// return &child; // this is user root
//auto inherits = find_preset(child.inherits());
//return inherits ? get_preset_base(*inherits) : nullptr;
return &child;
if (child.is_system || child.is_default)
return &child;
// Handle user preset
if (child.inherits().empty())
return &child; // this is user root
auto inherits = find_preset(child.inherits());
return inherits ? get_preset_base(*inherits) : nullptr;
}
// Return vendor of the first parent profile, for which the vendor is defined, or null if such profile does not exist.