summaryrefslogtreecommitdiffstats
path: root/editor/editor_help.cpp
diff options
context:
space:
mode:
authorAlex Drozd <drozdster@gmail.com>2023-05-13 11:57:44 +0200
committerAlex Drozd <drozdster@gmail.com>2023-05-14 17:41:14 +0200
commit28f391f301e55755d3c2bd0055d783da4ef5e122 (patch)
treebc98fc2b564e797f0e9732c61cd1e8750af695d5 /editor/editor_help.cpp
parentc64afeb01731c477813d959daee99a99612d8077 (diff)
downloadredot-engine-28f391f301e55755d3c2bd0055d783da4ef5e122.tar.gz
Exclude overriden properties from Property Descriptions section
Diffstat (limited to 'editor/editor_help.cpp')
-rw-r--r--editor/editor_help.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp
index dd2ee8c4ce..5a31bc0974 100644
--- a/editor/editor_help.cpp
+++ b/editor/editor_help.cpp
@@ -915,14 +915,15 @@ void EditorHelp::_update_doc() {
// Properties overview
HashSet<String> skip_methods;
- bool has_properties = cd.properties.size() != 0;
- if (cd.is_script_doc) {
- has_properties = false;
- for (int i = 0; i < cd.properties.size(); i++) {
- if (cd.properties[i].name.begins_with("_") && cd.properties[i].description.strip_edges().is_empty()) {
- continue;
- }
- has_properties = true;
+ bool has_properties = false;
+ bool has_property_descriptions = false;
+ for (const DocData::PropertyDoc &prop : cd.properties) {
+ if (cd.is_script_doc && prop.name.begins_with("_") && prop.description.strip_edges().is_empty()) {
+ continue;
+ }
+ has_properties = true;
+ if (!prop.overridden) {
+ has_property_descriptions = true;
break;
}
}
@@ -1601,7 +1602,7 @@ void EditorHelp::_update_doc() {
}
// Property descriptions
- if (has_properties) {
+ if (has_property_descriptions) {
section_line.push_back(Pair<String, int>(TTR("Property Descriptions"), class_desc->get_paragraph_count() - 2));
_push_title_font();
class_desc->add_text(TTR("Property Descriptions"));