diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp index 084830ed7bd..9da84400940 100644 --- a/editor/scene_tree_dock.cpp +++ b/editor/scene_tree_dock.cpp @@ -377,7 +377,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { } break; case TOOL_CLEAR_SCRIPT: { - List selection = editor_selection->get_selected_node_list(); + Array selection = editor_selection->get_selected_nodes(); if (selection.empty()) return; @@ -385,13 +385,14 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { editor_data->get_undo_redo().create_action(TTR("Clear Script")); editor_data->get_undo_redo().add_do_method(editor, "push_item", (Script *)NULL); - for (List::Element *E = selection.front(); E; E = E->next()) { + for (int i = 0; i < selection.size(); i++) { - Ref