Fixes missing descriptions in search window of visualscript

(cherry picked from commit 5e8d31ef0e)
This commit is contained in:
Umang Kalra 2021-06-15 20:30:43 +05:30 committed by Rémi Verschelde
parent 8beb57476f
commit 71da90f5bb
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 3 additions and 2 deletions

View File

@ -466,10 +466,11 @@ void VisualScriptPropertySelector::_item_selected() {
at_class = ClassDB::get_parent_class_nocheck(at_class);
}
Map<String, DocData::ClassDoc>::Element *T = dd->class_list.find(class_type);
Vector<String> functions = name.rsplit("/", false);
at_class = functions.size() > 3 ? functions[functions.size() - 2] : class_type;
Map<String, DocData::ClassDoc>::Element *T = dd->class_list.find(at_class);
if (T) {
for (int i = 0; i < T->get().methods.size(); i++) {
Vector<String> functions = name.rsplit("/", false, 1);
if (T->get().methods[i].name == functions[functions.size() - 1]) {
text = T->get().methods[i].description;
}