diff --git a/editor/docks/scene_tree_dock.cpp b/editor/docks/scene_tree_dock.cpp index 6d576e04361..e592a32d2fa 100644 --- a/editor/docks/scene_tree_dock.cpp +++ b/editor/docks/scene_tree_dock.cpp @@ -1156,7 +1156,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { break; } - const List &selection = editor_selection->get_top_selected_node_list(); + const List selection = editor_selection->get_top_selected_node_list(); if (selection.size() != 1) { accept->set_text(vformat(TTR("Saving the branch as a scene requires selecting only one node, but you have selected %d nodes."), selection.size())); @@ -1217,7 +1217,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { new_scene_from_dialog->popup_file_dialog(); } break; case TOOL_COPY_NODE_PATH: { - const List &selection = editor_selection->get_top_selected_node_list(); + const List selection = editor_selection->get_top_selected_node_list(); const List::Element *e = selection.front(); if (e) { Node *node = e->get(); @@ -1229,7 +1229,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { } } break; case TOOL_SHOW_IN_FILE_SYSTEM: { - const List &selection = editor_selection->get_top_selected_node_list(); + const List selection = editor_selection->get_top_selected_node_list(); const List::Element *e = selection.front(); if (e) { const Node *node = e->get(); @@ -1239,7 +1239,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { } } break; case TOOL_OPEN_DOCUMENTATION: { - const List &selection = editor_selection->get_top_selected_node_list(); + const List selection = editor_selection->get_top_selected_node_list(); for (const Node *node : selection) { String class_name; Ref