Clarify API for top selected nodes in EditorSelection and make public

This commit is contained in:
Aaron Franke
2024-12-01 06:40:29 -08:00
parent 594d64ec24
commit 17db92b8b8
12 changed files with 119 additions and 102 deletions

View File

@@ -6449,7 +6449,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);