Editor: Fix skipping normal category followed by custom one

(cherry picked from commit b2f62658a2)
This commit is contained in:
Danil Alexeev 2024-02-14 11:28:53 +03:00 committed by Rémi Verschelde
parent 3098b02e56
commit 5b25a115c8
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 3 additions and 1 deletions

View File

@ -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;
}