diff options
author | Umang Kalra <umangkalra10@gmail.com> | 2021-06-15 20:30:43 +0530 |
---|---|---|
committer | Umang Kalra <umangkalra10@gmail.com> | 2021-06-15 20:30:54 +0530 |
commit | 5e8d31ef0eaf89c61b4180df470cad33fc5788bc (patch) | |
tree | 5e70d6b8f5da30d0ea4d634f4f6f0aa1ee560076 | |
parent | 12e0f10c74e9619262f1edcfdc1840432ada0565 (diff) |
Fixes missing descriptions in search window of visualscript
-rw-r--r-- | modules/visual_script/visual_script_property_selector.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/visual_script/visual_script_property_selector.cpp b/modules/visual_script/visual_script_property_selector.cpp index 7a3cd5c0d1..2e8d6285be 100644 --- a/modules/visual_script/visual_script_property_selector.cpp +++ b/modules/visual_script/visual_script_property_selector.cpp @@ -469,10 +469,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 = DTR(T->get().methods[i].description); } |