Skip to content

Commit

Permalink
Merge pull request #95149 from KoBeWi/inspector_mains
Browse files Browse the repository at this point in the history
Don't fold resources when child of main inspector exits
  • Loading branch information
akien-mga committed Oct 4, 2024
2 parents fe31ede + 5cf9afb commit b08a3d8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion editor/editor_properties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3353,7 +3353,8 @@ void EditorPropertyResource::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_EXIT_TREE: {
const EditorInspector *ei = get_parent_inspector();
if (ei && !ei->is_main_editor_inspector()) {
const EditorInspector *main_ei = InspectorDock::get_inspector_singleton();
if (ei && main_ei && ei != main_ei && !main_ei->is_ancestor_of(ei)) {
fold_resource();
}
} break;
Expand Down

0 comments on commit b08a3d8

Please sign in to comment.