From 438f1a823878bf1489d66504e98df01a09d6ab51 Mon Sep 17 00:00:00 2001 From: Thakee Nathees Date: Fri, 5 Jun 2020 12:25:07 +0530 Subject: [PATCH] Fix: Ctrl + Click not working for subclasses (cherry picked from commit 95b0a00d2cd282a50c2d7f3a638b7ccfd8648947) --- modules/gdscript/gdscript_editor.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp index 9f2248ea70e..1069819bc3d 100644 --- a/modules/gdscript/gdscript_editor.cpp +++ b/modules/gdscript/gdscript_editor.cpp @@ -3117,6 +3117,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; }