Merge pull request #10205 from endragor/nativescript-base-defaults
Fix getting default values for NativeScript base type properties
This commit is contained in:
commit
b5c6b0cf1c
1 changed files with 5 additions and 5 deletions
|
@ -317,11 +317,11 @@ void NativeScript::get_script_signal_list(List<MethodInfo> *r_signals) const {
|
||||||
bool NativeScript::get_property_default_value(const StringName &p_property, Variant &r_value) const {
|
bool NativeScript::get_property_default_value(const StringName &p_property, Variant &r_value) const {
|
||||||
NativeScriptDesc *script_data = get_script_desc();
|
NativeScriptDesc *script_data = get_script_desc();
|
||||||
|
|
||||||
if (!script_data)
|
Map<StringName, NativeScriptDesc::Property>::Element *P = NULL;
|
||||||
return false;
|
while (!P && script_data) {
|
||||||
|
P = script_data->properties.find(p_property);
|
||||||
Map<StringName, NativeScriptDesc::Property>::Element *P = script_data->properties.find(p_property);
|
script_data = script_data->base_data;
|
||||||
|
}
|
||||||
if (!P)
|
if (!P)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue