diff options
author | Yuri Sizov <yuris@humnom.net> | 2022-01-19 00:07:47 +0300 |
---|---|---|
committer | Yuri Sizov <yuris@humnom.net> | 2022-01-19 00:07:47 +0300 |
commit | 49553ecfe31d521ac756ed0448996746defb97a6 (patch) | |
tree | ff63c72f99ee0338c53d4213ee3f610fb7441404 | |
parent | 366d3930ac96db5561afd23b1063085fccf6dcd6 (diff) |
Sort class properties in the built-in docs
-rw-r--r-- | editor/doc_tools.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/editor/doc_tools.cpp b/editor/doc_tools.cpp index a71e16b66c..976d8697ee 100644 --- a/editor/doc_tools.cpp +++ b/editor/doc_tools.cpp @@ -350,7 +350,7 @@ void DocTools::generate(bool p_basic_types) { List<PropertyInfo> properties; List<PropertyInfo> own_properties; if (name == "ProjectSettings") { - //special case for project settings, so settings can be documented + // Special case for project settings, so settings can be documented. ProjectSettings::get_singleton()->get_property_list(&properties); own_properties = properties; } else { @@ -358,9 +358,12 @@ void DocTools::generate(bool p_basic_types) { ClassDB::get_property_list(name, &own_properties, true); } + properties.sort(); + own_properties.sort(); + List<PropertyInfo>::Element *EO = own_properties.front(); for (const PropertyInfo &E : properties) { - bool inherited = EO == nullptr; + bool inherited = true; if (EO && EO->get() == E) { inherited = false; EO = EO->next(); |