summaryrefslogtreecommitdiff
path: root/editor/editor_properties.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_properties.cpp')
-rw-r--r--editor/editor_properties.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp
index 30c7d2b85f..801f1ca5b6 100644
--- a/editor/editor_properties.cpp
+++ b/editor/editor_properties.cpp
@@ -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;
}
}