From 5b25a115c8ae59658ba1854fe5df97b2f0a82598 Mon Sep 17 00:00:00 2001 From: Danil Alexeev Date: Wed, 14 Feb 2024 11:28:53 +0300 Subject: [PATCH] Editor: Fix skipping normal category followed by custom one (cherry picked from commit b2f62658a26dd8beb9298a2dc30ea38a96c61fcd) --- editor/editor_inspector.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp index 6dc38635be0..715d0ca34e2 100644 --- a/editor/editor_inspector.cpp +++ b/editor/editor_inspector.cpp @@ -2791,7 +2791,9 @@ void EditorInspector::update_tree() { (!filter.is_empty() || !restrict_to_basic || (N->get().usage & PROPERTY_USAGE_EDITOR_BASIC_SETTING))) { break; } - if (N->get().usage & PROPERTY_USAGE_CATEGORY) { + // Treat custom categories as second-level ones. Do not skip a normal category if it is followed by a custom one. + // Skip in the other 3 cases (normal -> normal, custom -> custom, custom -> normal). + if ((N->get().usage & PROPERTY_USAGE_CATEGORY) && (p.hint_string.is_empty() || !N->get().hint_string.is_empty())) { valid = false; break; }