Merge pull request #73381 from KoBeWi/works_better_than_expected_huh

Fold resources when non-main inspector exits tree
This commit is contained in:
Yuri Sizov
2023-02-17 16:25:18 +03:00
committed by GitHub
3 changed files with 28 additions and 7 deletions

View File

@@ -4141,6 +4141,13 @@ void EditorPropertyResource::_notification(int p_what) {
_update_property_bg();
}
} break;
case NOTIFICATION_EXIT_TREE: {
const EditorInspector *ei = get_parent_inspector();
if (ei && !ei->is_main_editor_inspector()) {
fold_resource();
}
} break;
}
}