Merge pull request #23016 from QbieShay/fix_visibility_toggle

Fixed visibility toggle with node selection
This commit is contained in:
Rémi Verschelde 2018-10-16 14:34:22 +02:00 committed by GitHub
commit 48d3d15e93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);