From ccd986f53e468321b9eeb09474c77cfab2c988da Mon Sep 17 00:00:00 2001 From: Peter Folkins Date: Thu, 26 Apr 2018 13:16:00 -0500 Subject: [PATCH] Fix enums without class name not opening docs page --- modules/gdscript/gdscript_editor.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp index 0d52f0a995b..ea94f8e7847 100644 --- a/modules/gdscript/gdscript_editor.cpp +++ b/modules/gdscript/gdscript_editor.cpp @@ -2641,6 +2641,18 @@ Error GDScriptLanguage::lookup_code(const String &p_code, const String &p_symbol context.function = p.get_completion_function(); context.base = p_owner; context.base_path = p_base_path; + + if (context._class && context._class->extends_class.size() > 0) { + bool success = false; + ClassDB::get_integer_constant(context._class->extends_class[0], p_symbol, &success); + if (success) { + r_result.type = ScriptLanguage::LookupResult::RESULT_CLASS_CONSTANT; + r_result.class_name = context._class->extends_class[0]; + r_result.class_member = p_symbol; + return OK; + } + } + bool isfunction = false; switch (p.get_completion_type()) {