Fix regression with enum descriptions now showing up in documentation.
This commit is contained in:
parent
46424488ed
commit
d48636c3bf
|
@ -1367,7 +1367,7 @@ void EditorHelp::_update_doc() {
|
||||||
class_desc->add_newline();
|
class_desc->add_newline();
|
||||||
|
|
||||||
// Enum description.
|
// Enum description.
|
||||||
if (e != "@unnamed_enums" && cd.enums.has(e)) {
|
if (e != "@unnamed_enums" && cd.enums.has(e) && !cd.enums[e].strip_edges().is_empty()) {
|
||||||
class_desc->push_color(theme_cache.text_color);
|
class_desc->push_color(theme_cache.text_color);
|
||||||
_push_normal_font();
|
_push_normal_font();
|
||||||
class_desc->push_indent(1);
|
class_desc->push_indent(1);
|
||||||
|
|
|
@ -236,6 +236,8 @@ void GDScriptDocGen::generate_docs(GDScript *p_script, const GDP::ClassNode *p_c
|
||||||
|
|
||||||
p_script->member_lines[name] = m_enum->start_line;
|
p_script->member_lines[name] = m_enum->start_line;
|
||||||
|
|
||||||
|
doc.enums[name] = m_enum->doc_description;
|
||||||
|
|
||||||
for (const GDP::EnumNode::Value &val : m_enum->values) {
|
for (const GDP::EnumNode::Value &val : m_enum->values) {
|
||||||
DocData::ConstantDoc const_doc;
|
DocData::ConstantDoc const_doc;
|
||||||
const_doc.name = val.identifier->name;
|
const_doc.name = val.identifier->name;
|
||||||
|
@ -244,7 +246,6 @@ void GDScriptDocGen::generate_docs(GDScript *p_script, const GDP::ClassNode *p_c
|
||||||
const_doc.description = val.doc_description;
|
const_doc.description = val.doc_description;
|
||||||
const_doc.enumeration = name;
|
const_doc.enumeration = name;
|
||||||
|
|
||||||
doc.enums[const_doc.name] = const_doc.description;
|
|
||||||
doc.constants.push_back(const_doc);
|
doc.constants.push_back(const_doc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue