Fix autocompletion for singletons

This commit is contained in:
EbbDrop 2019-10-16 21:54:39 +02:00
parent 119bf23720
commit f70fd781fc

View File

@ -1944,13 +1944,12 @@ static void _find_identifiers_in_base(const GDScriptCompletionContext &p_context
ScriptCodeCompletionOption option(E->get().name, ScriptCodeCompletionOption::KIND_MEMBER);
r_result.insert(option.display, option);
}
} else {
}
for (const Set<StringName>::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) {
for (const Map<StringName, Variant>::Element *E = script->get_constants().front(); E; E = E->next()) {
ScriptCodeCompletionOption option(E->key().operator String(), ScriptCodeCompletionOption::KIND_CONSTANT);