summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-10-16 14:34:22 +0200
committerGitHub <noreply@github.com>2018-10-16 14:34:22 +0200
commit48d3d15e9390b465935a8b3e78470c63643c2d51 (patch)
tree3dde29550f893ccb0435b5c81ac6c02e724d0b2a /editor
parent155652908a4284658b6c9b27640142a15fcb502c (diff)
parent9de3924fea091ed9877c9edad3b3688ecfe23449 (diff)
Merge pull request #23016 from QbieShay/fix_visibility_toggle
Fixed visibility toggle with node selection
Diffstat (limited to 'editor')
-rw-r--r--editor/scene_tree_editor.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/scene_tree_editor.cpp b/editor/scene_tree_editor.cpp
index 07670bb420..848e4def6d 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<Node *> selection = editor_selection->get_selected_node_list();
- if (selection.size() > 1) {
+ if (selection.size() > 1 && selection.find(n) != NULL) {
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
Node *nv = E->get();
ERR_FAIL_COND(!nv);