Skip to content

Commit b08a3d8

Browse files
committed
Merge pull request #95149 from KoBeWi/inspector_mains
Don't fold resources when child of main inspector exits
2 parents fe31ede + 5cf9afb commit b08a3d8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

editor/editor_properties.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3353,7 +3353,8 @@ void EditorPropertyResource::_notification(int p_what) {
33533353
switch (p_what) {
33543354
case NOTIFICATION_EXIT_TREE: {
33553355
const EditorInspector *ei = get_parent_inspector();
3356-
if (ei && !ei->is_main_editor_inspector()) {
3356+
const EditorInspector *main_ei = InspectorDock::get_inspector_singleton();
3357+
if (ei && main_ei && ei != main_ei && !main_ei->is_ancestor_of(ei)) {
33573358
fold_resource();
33583359
}
33593360
} break;

0 commit comments

Comments
 (0)