From ed960453b721e62e8e2c37a4695a78f7b0a862d8 Mon Sep 17 00:00:00 2001 From: RedMser Date: Tue, 29 Nov 2022 02:42:19 +0100 Subject: Make solving project setting errors easier Show full project setting path in error messages. Force filtering for advanced settings if filter is not empty. --- editor/editor_inspector.cpp | 6 ++++-- editor/editor_sectioned_inspector.cpp | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'editor') diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp index 44426dc143..532aa5bd7a 100644 --- a/editor/editor_inspector.cpp +++ b/editor/editor_inspector.cpp @@ -2731,7 +2731,8 @@ void EditorInspector::update_tree() { List::Element *N = E_property->next(); bool valid = true; while (N) { - if (!N->get().name.begins_with("metadata/_") && N->get().usage & PROPERTY_USAGE_EDITOR && (!restrict_to_basic || (N->get().usage & PROPERTY_USAGE_EDITOR_BASIC_SETTING))) { + if (!N->get().name.begins_with("metadata/_") && N->get().usage & PROPERTY_USAGE_EDITOR && + (!filter.is_empty() || !restrict_to_basic || (N->get().usage & PROPERTY_USAGE_EDITOR_BASIC_SETTING))) { break; } if (N->get().usage & PROPERTY_USAGE_CATEGORY) { @@ -2821,7 +2822,8 @@ void EditorInspector::update_tree() { continue; - } else if (p.name.begins_with("metadata/_") || !(p.usage & PROPERTY_USAGE_EDITOR) || _is_property_disabled_by_feature_profile(p.name) || (restrict_to_basic && !(p.usage & PROPERTY_USAGE_EDITOR_BASIC_SETTING))) { + } else if (p.name.begins_with("metadata/_") || !(p.usage & PROPERTY_USAGE_EDITOR) || _is_property_disabled_by_feature_profile(p.name) || + (filter.is_empty() && restrict_to_basic && !(p.usage & PROPERTY_USAGE_EDITOR_BASIC_SETTING))) { // Ignore properties that are not supposed to be in the inspector. continue; } diff --git a/editor/editor_sectioned_inspector.cpp b/editor/editor_sectioned_inspector.cpp index 3988d356b3..8716a75efd 100644 --- a/editor/editor_sectioned_inspector.cpp +++ b/editor/editor_sectioned_inspector.cpp @@ -239,7 +239,8 @@ void SectionedInspector::update_category_list() { for (PropertyInfo &pi : pinfo) { if (pi.usage & PROPERTY_USAGE_CATEGORY) { continue; - } else if (!(pi.usage & PROPERTY_USAGE_EDITOR) || (restrict_to_basic && !(pi.usage & PROPERTY_USAGE_EDITOR_BASIC_SETTING))) { + } else if (!(pi.usage & PROPERTY_USAGE_EDITOR) || + (filter_text.is_empty() && restrict_to_basic && !(pi.usage & PROPERTY_USAGE_EDITOR_BASIC_SETTING))) { continue; } -- cgit v1.2.3