浏览代码

Fixed the jumping to function definition using 'Ctrl+LMB'.

S.V.I. Vilcrow 2 年之前
父节点
当前提交
7eb6367d5c
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8 0
      modules/gdscript/gdscript_editor.cpp

+ 8 - 0
modules/gdscript/gdscript_editor.cpp

@@ -3480,6 +3480,14 @@ static Error _lookup_symbol_from_base(const GDScriptParser::DataType &p_base, co
 				break;
 			}
 
+			if (context.current_class) {
+				if (context.type != GDScriptParser::COMPLETION_SUPER_METHOD) {
+					base.type = context.current_class->get_datatype();
+				} else {
+					base.type = context.current_class->base_type;
+				}
+			}
+
 			if (_lookup_symbol_from_base(base.type, p_symbol, is_function, r_result) == OK) {
 				return OK;
 			}