diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-06-17 23:04:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-17 23:04:07 +0200 |
commit | b02f42def7e28c44df195f532ad5ca264c70b3e0 (patch) | |
tree | 86efd7e2cdd590bd433b9cb37421299416161adb /modules/visual_script | |
parent | 13c4796693c3c32993cd49b226fc9c78ad376f6d (diff) | |
parent | 5e8d31ef0eaf89c61b4180df470cad33fc5788bc (diff) |
Merge pull request #49043 from theoway/missing_description_vs_search_window_fixed
Fixes missing descriptions in Visual Script search window when adding nodes
Diffstat (limited to 'modules/visual_script')
-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 4a1e020bd4..79addc5828 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); } |