1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-06 12:20:30 +00:00

Merge pull request #99897 from aaronfranke/editor-top-nodes

Clarify API for top selected nodes in EditorSelection and make public
This commit is contained in:
Rémi Verschelde
2025-03-28 17:29:51 +01:00
12 changed files with 119 additions and 102 deletions

View File

@@ -6494,7 +6494,7 @@ void EditorNode::reload_instances_with_path_in_edited_scenes() {
// Store all the paths for any selected nodes which are ancestors of the node we're replacing.
List<NodePath> selected_node_paths;
for (Node *selected_node : editor_selection->get_selected_node_list()) {
for (Node *selected_node : editor_selection->get_top_selected_node_list()) {
if (selected_node == original_node || original_node->is_ancestor_of(selected_node)) {
selected_node_paths.push_back(original_node->get_path_to(selected_node));
editor_selection->remove_node(selected_node);