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

@ -112,7 +112,7 @@ void SceneTreeEditor::_cell_button_pressed(Object *p_item, int p_column, int p_i
} else if (p_id == BUTTON_VISIBILITY) {
undo_redo->create_action(TTR("Toggle Visible"));
_toggle_visible(n);
List<Node *> selection = editor_selection->get_selected_node_list();
List<Node *> selection = editor_selection->get_top_selected_node_list();
if (selection.size() > 1 && selection.find(n) != nullptr) {
for (Node *nv : selection) {
ERR_FAIL_NULL(nv);