File tree Expand file tree Collapse file tree 1 file changed +2
-11
lines changed
Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -4039,25 +4039,16 @@ void EditorInspector::_notification(int p_what) {
40394039 EditorFeatureProfileManager::get_singleton ()->connect (" current_feature_profile_changed" , callable_mp (this , &EditorInspector::_feature_profile_changed));
40404040 set_process (is_visible_in_tree ());
40414041 add_theme_style_override (" panel" , get_theme_stylebox (SNAME (" panel" ), SNAME (" Tree" )));
4042- } break ;
4043-
4044- case NOTIFICATION_ENTER_TREE: {
40454042 if (!sub_inspector) {
40464043 get_tree ()->connect (" node_removed" , callable_mp (this , &EditorInspector::_node_removed));
40474044 }
40484045 } break ;
40494046
40504047 case NOTIFICATION_PREDELETE: {
4051- if (EditorNode::get_singleton () && !EditorNode::get_singleton ()->is_exiting ()) {
4052- // Don't need to clean up if exiting, and object may already be freed.
4053- edit (nullptr );
4054- }
4055- } break ;
4056-
4057- case NOTIFICATION_EXIT_TREE: {
4058- if (!sub_inspector) {
4048+ if (!sub_inspector && is_inside_tree ()) {
40594049 get_tree ()->disconnect (" node_removed" , callable_mp (this , &EditorInspector::_node_removed));
40604050 }
4051+ edit (nullptr );
40614052 } break ;
40624053
40634054 case NOTIFICATION_VISIBILITY_CHANGED: {
You can’t perform that action at this time.
0 commit comments