You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-19 14:31:59 +00:00
ProjectSettings: Fix missing property hint of setting overrides
This commit is contained in:
@@ -421,7 +421,7 @@ void ProjectSettings::_get_property_list(List<PropertyInfo> *p_list) const {
|
|||||||
_THREAD_SAFE_METHOD_
|
_THREAD_SAFE_METHOD_
|
||||||
|
|
||||||
RBSet<_VCSort> vclist;
|
RBSet<_VCSort> vclist;
|
||||||
HashMap<String, Vector<_VCSort>> setting_overrides;
|
HashMap<String, LocalVector<_VCSort>> setting_overrides;
|
||||||
|
|
||||||
for (const KeyValue<StringName, VariantContainer> &E : props) {
|
for (const KeyValue<StringName, VariantContainer> &E : props) {
|
||||||
const VariantContainer *v = &E.value;
|
const VariantContainer *v = &E.value;
|
||||||
@@ -464,10 +464,11 @@ void ProjectSettings::_get_property_list(List<PropertyInfo> *p_list) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int dot = vc.name.rfind_char('.');
|
int dot = vc.name.rfind_char('.');
|
||||||
if (dot != -1 && !custom_prop_info.has(vc.name)) {
|
if (dot != -1) {
|
||||||
StringName n = vc.name.substr(0, dot);
|
StringName n = vc.name.substr(0, dot);
|
||||||
if (props.has(n)) { // Property is an override.
|
if (props.has(n)) {
|
||||||
setting_overrides[n].append(vc);
|
// Property is an override.
|
||||||
|
setting_overrides[n].push_back(vc);
|
||||||
} else {
|
} else {
|
||||||
vclist.insert(vc);
|
vclist.insert(vc);
|
||||||
}
|
}
|
||||||
@@ -505,6 +506,12 @@ void ProjectSettings::_get_property_list(List<PropertyInfo> *p_list) const {
|
|||||||
pi.name = over.name;
|
pi.name = over.name;
|
||||||
pi.usage = over.flags;
|
pi.usage = over.flags;
|
||||||
p_list->push_back(pi);
|
p_list->push_back(pi);
|
||||||
|
} else if (custom_prop_info.has(base.name)) {
|
||||||
|
// Fallback to base property info.
|
||||||
|
PropertyInfo pi = custom_prop_info[base.name];
|
||||||
|
pi.name = over.name;
|
||||||
|
pi.usage = over.flags;
|
||||||
|
p_list->push_back(pi);
|
||||||
} else {
|
} else {
|
||||||
p_list->push_back(PropertyInfo(over.type, over.name, PROPERTY_HINT_NONE, "", over.flags));
|
p_list->push_back(PropertyInfo(over.type, over.name, PROPERTY_HINT_NONE, "", over.flags));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user