summaryrefslogtreecommitdiffstats
path: root/editor/editor_inspector.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_inspector.cpp')
-rw-r--r--editor/editor_inspector.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp
index a14c6e8462..7919d61f26 100644
--- a/editor/editor_inspector.cpp
+++ b/editor/editor_inspector.cpp
@@ -57,7 +57,7 @@ bool EditorInspector::_property_path_matches(const String &p_property_path, cons
const Vector<String> prop_sections = p_property_path.split("/");
for (int i = 0; i < prop_sections.size(); i++) {
- if (p_filter.is_subsequence_ofn(EditorPropertyNameProcessor::get_singleton()->process_name(prop_sections[i], p_style))) {
+ if (p_filter.is_subsequence_ofn(EditorPropertyNameProcessor::get_singleton()->process_name(prop_sections[i], p_style, p_property_path))) {
return true;
}
}
@@ -86,8 +86,7 @@ Size2 EditorProperty::get_minimum_size() const {
}
Size2 minsize = c->get_combined_minimum_size();
- ms.width = MAX(ms.width, minsize.width);
- ms.height = MAX(ms.height, minsize.height);
+ ms = ms.max(minsize);
}
if (keying) {
@@ -1463,8 +1462,7 @@ Size2 EditorInspectorSection::get_minimum_size() const {
continue;
}
Size2 minsize = c->get_combined_minimum_size();
- ms.width = MAX(ms.width, minsize.width);
- ms.height = MAX(ms.height, minsize.height);
+ ms = ms.max(minsize);
}
Ref<Font> font = get_theme_font(SNAME("font"), SNAME("Tree"));
@@ -2806,6 +2804,9 @@ void EditorInspector::update_tree() {
subgroup_base = "";
section_depth = 0;
+ vbox_per_path.clear();
+ editor_inspector_array_per_prefix.clear();
+
if (!show_categories) {
continue;
}
@@ -3011,7 +3012,7 @@ void EditorInspector::update_tree() {
if ((p.usage & PROPERTY_USAGE_SCRIPT_VARIABLE) && name_style == EditorPropertyNameProcessor::STYLE_LOCALIZED) {
name_style = EditorPropertyNameProcessor::STYLE_CAPITALIZED;
}
- const String property_label_string = EditorPropertyNameProcessor::get_singleton()->process_name(name_override, name_style) + feature_tag;
+ const String property_label_string = EditorPropertyNameProcessor::get_singleton()->process_name(name_override, name_style, p.name, doc_name) + feature_tag;
// Remove the property from the path.
int idx = path.rfind("/");
@@ -3080,8 +3081,8 @@ void EditorInspector::update_tree() {
tooltip = EditorPropertyNameProcessor::get_singleton()->translate_group_name(component);
}
} else {
- label = EditorPropertyNameProcessor::get_singleton()->process_name(component, section_name_style);
- tooltip = EditorPropertyNameProcessor::get_singleton()->process_name(component, EditorPropertyNameProcessor::get_tooltip_style(section_name_style));
+ label = EditorPropertyNameProcessor::get_singleton()->process_name(component, section_name_style, p.name, doc_name);
+ tooltip = EditorPropertyNameProcessor::get_singleton()->process_name(component, EditorPropertyNameProcessor::get_tooltip_style(section_name_style), p.name, doc_name);
}
Color c = sscolor;
@@ -3144,7 +3145,7 @@ void EditorInspector::update_tree() {
editor_inspector_array = memnew(EditorInspectorArray(all_read_only));
String array_label = path.contains("/") ? path.substr(path.rfind("/") + 1) : path;
- array_label = EditorPropertyNameProcessor::get_singleton()->process_name(property_label_string, property_name_style);
+ array_label = EditorPropertyNameProcessor::get_singleton()->process_name(property_label_string, property_name_style, p.name, doc_name);
int page = per_array_page.has(array_element_prefix) ? per_array_page[array_element_prefix] : 0;
editor_inspector_array->setup_with_move_element_function(object, array_label, array_element_prefix, page, c, use_folding);
editor_inspector_array->connect("page_change_request", callable_mp(this, &EditorInspector::_page_change_request).bind(array_element_prefix));