|
@@ -872,7 +872,7 @@ static String _make_arguments_hint(const GDScriptParser::FunctionNode *p_functio
|
|
|
|
|
|
static void _get_directory_contents(EditorFileSystemDirectory *p_dir, HashMap<String, ScriptLanguage::CodeCompletionOption> &r_list, const StringName &p_required_type = StringName()) {
|
|
static void _get_directory_contents(EditorFileSystemDirectory *p_dir, HashMap<String, ScriptLanguage::CodeCompletionOption> &r_list, const StringName &p_required_type = StringName()) {
|
|
const String quote_style = EDITOR_GET("text_editor/completion/use_single_quotes") ? "'" : "\"";
|
|
const String quote_style = EDITOR_GET("text_editor/completion/use_single_quotes") ? "'" : "\"";
|
|
- const bool requires_type = p_required_type;
|
|
|
|
|
|
+ const bool requires_type = !p_required_type.is_empty();
|
|
|
|
|
|
for (int i = 0; i < p_dir->get_file_count(); i++) {
|
|
for (int i = 0; i < p_dir->get_file_count(); i++) {
|
|
if (requires_type && !ClassDB::is_parent_class(p_dir->get_file_type(i), p_required_type)) {
|
|
if (requires_type && !ClassDB::is_parent_class(p_dir->get_file_type(i), p_required_type)) {
|