Fix lock or group with invisible node

Fix #15205
This commit is contained in:
volzhs 2018-01-01 02:18:39 +09:00
parent 548bd4ef1d
commit 108b4a37b0
1 changed files with 4 additions and 4 deletions

View File

@ -3464,7 +3464,7 @@ void CanvasItemEditor::_popup_callback(int p_op) {
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E->get());
if (!canvas_item || !canvas_item->is_visible_in_tree())
if (!canvas_item || !canvas_item->is_inside_tree())
continue;
if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root())
@ -3482,7 +3482,7 @@ void CanvasItemEditor::_popup_callback(int p_op) {
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E->get());
if (!canvas_item || !canvas_item->is_visible_in_tree())
if (!canvas_item || !canvas_item->is_inside_tree())
continue;
if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root())
@ -3502,7 +3502,7 @@ void CanvasItemEditor::_popup_callback(int p_op) {
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E->get());
if (!canvas_item || !canvas_item->is_visible_in_tree())
if (!canvas_item || !canvas_item->is_inside_tree())
continue;
if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root())
@ -3520,7 +3520,7 @@ void CanvasItemEditor::_popup_callback(int p_op) {
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E->get());
if (!canvas_item || !canvas_item->is_visible_in_tree())
if (!canvas_item || !canvas_item->is_inside_tree())
continue;
if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root())