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
commit b12258bd22
No known key found for this signature in database
GPG key ID: C3336907360768E1
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);