File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -2650,6 +2650,13 @@ void SceneTreeDock::_delete_confirm(bool p_cut) {
26502650 }
26512651 }
26522652
2653+ if (!entire_scene) {
2654+ for (const Node *E : remove_list) {
2655+ // `move_child` + `get_index` doesn't really work for internal nodes.
2656+ ERR_FAIL_COND_MSG (E->get_internal_mode () != INTERNAL_MODE_DISABLED, " Trying to remove internal node, this is not supported." );
2657+ }
2658+ }
2659+
26532660 EditorNode::get_singleton ()->hide_unused_editors (this );
26542661
26552662 EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton ();
@@ -2662,10 +2669,6 @@ void SceneTreeDock::_delete_confirm(bool p_cut) {
26622669 undo_redo->add_undo_method (scene_tree, " update_tree" );
26632670 undo_redo->add_undo_reference (edited_scene);
26642671 } else {
2665- for (const Node *E : remove_list) {
2666- // `move_child` + `get_index` doesn't really work for internal nodes.
2667- ERR_FAIL_COND_MSG (E->get_internal_mode () != INTERNAL_MODE_DISABLED, " Trying to remove internal node, this is not supported." );
2668- }
26692672 if (delete_tracks_checkbox->is_pressed () || p_cut) {
26702673 remove_list.sort_custom <Node::Comparator>(); // Sort nodes to keep positions.
26712674 HashMap<Node *, NodePath> path_renames;
You can’t perform that action at this time.
0 commit comments