From 9de3924fea091ed9877c9edad3b3688ecfe23449 Mon Sep 17 00:00:00 2001 From: QbieShay Date: Sun, 14 Oct 2018 19:33:34 +0200 Subject: [PATCH] fixed visibility toggle with node selection before this PR toggling visibility of not selected nodes would toggle the visibility of the whole selection. This PR changes this behaviour, so if visibility is toggled on a node that it is not selected, the visibility toggle will happen only on this node. No changes to the behaviour of when one of the selected nodes has visibility toggled: they still toggle all together --- editor/scene_tree_editor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor/scene_tree_editor.cpp b/editor/scene_tree_editor.cpp index 07670bb420e..848e4def6de 100644 --- a/editor/scene_tree_editor.cpp +++ b/editor/scene_tree_editor.cpp @@ -73,7 +73,7 @@ void SceneTreeEditor::_cell_button_pressed(Object *p_item, int p_column, int p_i undo_redo->create_action(TTR("Toggle Visible")); _toggle_visible(n); List selection = editor_selection->get_selected_node_list(); - if (selection.size() > 1) { + if (selection.size() > 1 && selection.find(n) != NULL) { for (List::Element *E = selection.front(); E; E = E->next()) { Node *nv = E->get(); ERR_FAIL_COND(!nv);