From 9e9c16c1e5c497f03235d7bef064e759a2ae813a Mon Sep 17 00:00:00 2001 From: MrCdK Date: Wed, 17 Apr 2019 13:06:28 +0200 Subject: Try and show all the properties added with _get_property_list() when triggering completion. Closes https://github.com/godotengine/godot/issues/25097 --- modules/gdscript/gdscript_editor.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp index 925dbda620..b4c38e4d40 100644 --- a/modules/gdscript/gdscript_editor.cpp +++ b/modules/gdscript/gdscript_editor.cpp @@ -1936,9 +1936,18 @@ static void _find_identifiers_in_base(const GDScriptCompletionContext &p_context Ref script = base_type.script_type; if (script.is_valid()) { if (!_static && !p_only_functions) { - for (const Set::Element *E = script->get_members().front(); E; E = E->next()) { - ScriptCodeCompletionOption option(E->get().operator String(), ScriptCodeCompletionOption::KIND_MEMBER); - r_result.insert(option.display, option); + if (p_context.base && p_context.base->get_script_instance()) { + List members; + p_context.base->get_script_instance()->get_property_list(&members); + for (List::Element *E = members.front(); E; E = E->next()) { + ScriptCodeCompletionOption option(E->get().name, ScriptCodeCompletionOption::KIND_MEMBER); + r_result.insert(option.display, option); + } + } else { + for (const Set::Element *E = script->get_members().front(); E; E = E->next()) { + ScriptCodeCompletionOption option(E->get().operator String(), ScriptCodeCompletionOption::KIND_MEMBER); + r_result.insert(option.display, option); + } } } if (!p_only_functions) { -- cgit v1.2.3