Merge pull request #39315 from ThakeeNathees/ctrl-click-fix-for-subclasses

Fix: Ctrl + Click not working for subclasses
This commit is contained in:
Rémi Verschelde 2020-06-16 09:26:15 +02:00 committed by GitHub
commit df0779acfd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3093,6 +3093,14 @@ static Error _lookup_symbol_from_base(const GDScriptParser::DataType &p_base, co
return OK;
}
}
for (int i = 0; i < base_type.class_type->subclasses.size(); i++) {
if (base_type.class_type->subclasses[i]->name == p_symbol) {
r_result.type = ScriptLanguage::LookupResult::RESULT_SCRIPT_LOCATION;
r_result.location = base_type.class_type->subclasses[i]->line;
return OK;
}
}
}
base_type = base_type.class_type->base_type;
}