summaryrefslogtreecommitdiff
path: root/scene/2d
diff options
context:
space:
mode:
Diffstat (limited to 'scene/2d')
-rw-r--r--scene/2d/canvas_item.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/scene/2d/canvas_item.cpp b/scene/2d/canvas_item.cpp
index ed1d606ba8..995120bc99 100644
--- a/scene/2d/canvas_item.cpp
+++ b/scene/2d/canvas_item.cpp
@@ -261,16 +261,13 @@ void CanvasItem::show() {
if (!hidden)
return;
-
hidden=false;
VisualServer::get_singleton()->canvas_item_set_visible(canvas_item,true);
if (!is_inside_tree())
return;
- if (is_visible()) {
- _propagate_visibility_changed(true);
- }
+ _propagate_visibility_changed(true);
_change_notify("visibility/visible");
}
@@ -280,15 +277,13 @@ void CanvasItem::hide() {
if (hidden)
return;
- bool propagate=is_inside_tree() && is_visible();
hidden=true;
VisualServer::get_singleton()->canvas_item_set_visible(canvas_item,false);
if (!is_inside_tree())
return;
- if (propagate)
- _propagate_visibility_changed(false);
+ _propagate_visibility_changed(false);
_change_notify("visibility/visible");
}