From 1b77993257c5fff14151dc21407cce9404db18ee Mon Sep 17 00:00:00 2001 From: rune-scape Date: Fri, 23 Dec 2022 17:39:24 -0500 Subject: [PATCH] Inner classes get their docs back --- modules/gdscript/gdscript.cpp | 4 ++++ modules/gdscript/gdscript_compiler.cpp | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/modules/gdscript/gdscript.cpp b/modules/gdscript/gdscript.cpp index 57a29cc81ea..31f6c40fd04 100644 --- a/modules/gdscript/gdscript.cpp +++ b/modules/gdscript/gdscript.cpp @@ -629,6 +629,10 @@ void GDScript::_update_doc() { } } + for (KeyValue> &E : subclasses) { + E.value->_update_doc(); + } + _add_doc(doc); } #endif diff --git a/modules/gdscript/gdscript_compiler.cpp b/modules/gdscript/gdscript_compiler.cpp index 50588110c4f..7fcb54379a4 100644 --- a/modules/gdscript/gdscript_compiler.cpp +++ b/modules/gdscript/gdscript_compiler.cpp @@ -2637,10 +2637,6 @@ Error GDScriptCompiler::_compile_class(GDScript *p_script, const GDScriptParser: } } -#ifdef TOOLS_ENABLED - p_script->_update_doc(); -#endif - p_script->_init_rpc_methods_properties(); p_script->valid = true; @@ -2725,6 +2721,10 @@ Error GDScriptCompiler::compile(const GDScriptParser *p_parser, GDScript *p_scri return err; } +#ifdef TOOLS_ENABLED + p_script->_update_doc(); +#endif + return GDScriptCache::finish_compiling(main_script->get_path()); }