summaryrefslogtreecommitdiff
path: root/tools/editor
diff options
context:
space:
mode:
authorAndreas Haas <liu.gam3@gmail.com>2017-01-19 17:10:47 +0100
committerAndreas Haas <liu.gam3@gmail.com>2017-01-19 17:11:00 +0100
commita043ce7304c4a9b56b5d79efa4cca05160339e72 (patch)
tree339cfdcaa4736a492d286e0000d285db7dd3fa34 /tools/editor
parent8e84e53ebb676e43adc7ac4b3e8791790f555695 (diff)
2D Editor: Don't show lock icons for hidden nodes.
Now we only draw those icons for visible Nodes. Fixes #7518
Diffstat (limited to 'tools/editor')
-rw-r--r--tools/editor/plugins/canvas_item_editor_plugin.cpp2
-rw-r--r--tools/editor/scene_tree_editor.cpp5
2 files changed, 5 insertions, 2 deletions
diff --git a/tools/editor/plugins/canvas_item_editor_plugin.cpp b/tools/editor/plugins/canvas_item_editor_plugin.cpp
index 9dbd2513a0..bec7956b8c 100644
--- a/tools/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/tools/editor/plugins/canvas_item_editor_plugin.cpp
@@ -2354,7 +2354,7 @@ void CanvasItemEditor::_find_canvas_items_span(Node *p_node, Rect2& r_rect, cons
- if (c) {
+ if (c && c->is_visible_in_tree()) {
Rect2 rect = c->get_item_rect();
Transform2D xform = p_xform * c->get_transform();
diff --git a/tools/editor/scene_tree_editor.cpp b/tools/editor/scene_tree_editor.cpp
index f92cfa00c1..dd1fdeb400 100644
--- a/tools/editor/scene_tree_editor.cpp
+++ b/tools/editor/scene_tree_editor.cpp
@@ -470,7 +470,10 @@ void SceneTreeEditor::_node_visibility_changed(Node *p_node) {
bool visible=false;
- if (p_node->is_class("CanvasItem") || p_node->is_class("Spatial")) {
+ if (p_node->is_class("CanvasItem")) {
+ visible = p_node->call("is_visible");
+ CanvasItemEditor::get_singleton()->get_viewport_control()->update();
+ } else if (p_node->is_class("Spatial")) {
visible = p_node->call("is_visible");
}