aboutsummaryrefslogtreecommitdiff
path: root/scene/2d/visibility_notifier_2d.cpp
diff options
context:
space:
mode:
authorJuan Linietsky2015-04-02 07:22:17 -0300
committerJuan Linietsky2015-04-02 07:22:17 -0300
commit1572238adb5b68e18cf20ec73b2f437736e21152 (patch)
tree4cf50ac1dd8d6253f4991ae5cb0b735841e9c661 /scene/2d/visibility_notifier_2d.cpp
parentebd743f7c215d65c877874cdf58b22437757fbc6 (diff)
downloadgodot-1572238adb5b68e18cf20ec73b2f437736e21152.tar.gz
godot-1572238adb5b68e18cf20ec73b2f437736e21152.tar.zst
godot-1572238adb5b68e18cf20ec73b2f437736e21152.zip
Diffstat (limited to 'scene/2d/visibility_notifier_2d.cpp')
-rw-r--r--scene/2d/visibility_notifier_2d.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/scene/2d/visibility_notifier_2d.cpp b/scene/2d/visibility_notifier_2d.cpp
index cd3c788b6..abaaf3262 100644
--- a/scene/2d/visibility_notifier_2d.cpp
+++ b/scene/2d/visibility_notifier_2d.cpp
@@ -65,8 +65,13 @@ void VisibilityNotifier2D::_exit_viewport(Viewport* p_viewport){
void VisibilityNotifier2D::set_rect(const Rect2& p_rect){
rect=p_rect;
- if (is_inside_tree())
+ if (is_inside_tree()) {
get_world_2d()->_update_notifier(this,get_global_transform().xform(rect));
+ if (get_tree()->is_editor_hint()) {
+ update();
+ item_rect_changed();
+ }
+ }
_change_notify("rect");
}