1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-08 12:40:44 +00:00

Merge pull request #49043 from theoway/missing_description_vs_search_window_fixed

Fixes missing descriptions in Visual Script search window when adding nodes
This commit is contained in:
Rémi Verschelde
2021-06-17 23:04:07 +02:00
committed by GitHub

View File

@@ -469,10 +469,11 @@ void VisualScriptPropertySelector::_item_selected() {
at_class = ClassDB::get_parent_class_nocheck(at_class); 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) { if (T) {
for (int i = 0; i < T->get().methods.size(); i++) { 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]) { if (T->get().methods[i].name == functions[functions.size() - 1]) {
text = DTR(T->get().methods[i].description); text = DTR(T->get().methods[i].description);
} }