summaryrefslogtreecommitdiffstats
path: root/scene/gui/control.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/gui/control.cpp')
-rw-r--r--scene/gui/control.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp
index c7b4c1f6c1..1af3f4c9e8 100644
--- a/scene/gui/control.cpp
+++ b/scene/gui/control.cpp
@@ -387,7 +387,7 @@ void Control::_notification(int p_notification) {
data.parent_canvas_item->disconnect("item_rect_changed",this,"_size_changed");
data.parent_canvas_item=NULL;
- } else {
+ } else if (!is_set_as_toplevel()) {
//disconnect viewport
get_viewport()->disconnect("size_changed",this,"_size_changed");