You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Exclude overriden properties from Property Descriptions section
This commit is contained in:
@@ -915,14 +915,15 @@ void EditorHelp::_update_doc() {
|
|||||||
// Properties overview
|
// Properties overview
|
||||||
HashSet<String> skip_methods;
|
HashSet<String> skip_methods;
|
||||||
|
|
||||||
bool has_properties = cd.properties.size() != 0;
|
bool has_properties = false;
|
||||||
if (cd.is_script_doc) {
|
bool has_property_descriptions = false;
|
||||||
has_properties = false;
|
for (const DocData::PropertyDoc &prop : cd.properties) {
|
||||||
for (int i = 0; i < cd.properties.size(); i++) {
|
if (cd.is_script_doc && prop.name.begins_with("_") && prop.description.strip_edges().is_empty()) {
|
||||||
if (cd.properties[i].name.begins_with("_") && cd.properties[i].description.strip_edges().is_empty()) {
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
has_properties = true;
|
has_properties = true;
|
||||||
|
if (!prop.overridden) {
|
||||||
|
has_property_descriptions = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1601,7 +1602,7 @@ void EditorHelp::_update_doc() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Property descriptions
|
// 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));
|
section_line.push_back(Pair<String, int>(TTR("Property Descriptions"), class_desc->get_paragraph_count() - 2));
|
||||||
_push_title_font();
|
_push_title_font();
|
||||||
class_desc->add_text(TTR("Property Descriptions"));
|
class_desc->add_text(TTR("Property Descriptions"));
|
||||||
|
|||||||
Reference in New Issue
Block a user