Hide unused category vboxes in inspector

This commit is contained in:
passivestar 2024-06-26 13:51:05 +04:00
parent 95110ddcb4
commit 025159f57e

View file

@ -3133,6 +3133,7 @@ void EditorInspector::update_tree() {
// Recreate the category vbox if it was reset.
if (category_vbox == nullptr) {
category_vbox = memnew(VBoxContainer);
category_vbox->hide();
main_vbox->add_child(category_vbox);
}
@ -3205,6 +3206,7 @@ void EditorInspector::update_tree() {
// If we did not find a section to add the property to, add it to the category vbox instead (the category vbox handles margins correctly).
if (current_vbox == main_vbox) {
category_vbox->show();
current_vbox = category_vbox;
}