Browse Source

Inner classes get their docs back

rune-scape 2 years ago
parent
commit
1b77993257
2 changed files with 8 additions and 4 deletions
  1. 4 0
      modules/gdscript/gdscript.cpp
  2. 4 4
      modules/gdscript/gdscript_compiler.cpp

+ 4 - 0
modules/gdscript/gdscript.cpp

@@ -629,6 +629,10 @@ void GDScript::_update_doc() {
 		}
 	}
 
+	for (KeyValue<StringName, Ref<GDScript>> &E : subclasses) {
+		E.value->_update_doc();
+	}
+
 	_add_doc(doc);
 }
 #endif

+ 4 - 4
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());
 }