summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2016-06-13 21:37:04 -0300
committerJuan Linietsky <reduzio@gmail.com>2016-06-13 21:37:04 -0300
commit4866713bc3ab58cd22ef5090a75b8a20e3b35e7d (patch)
treeb59f40fa5788225662d429a4c13b68be22779dbf /scene/gui
parent26d63b559433c12c8208d36ab586d36e47752829 (diff)
added a function CanvasItem.get_item_and_children_rect() , fixes #4738
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/control.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp
index 534bcbf16a..b122ab4183 100644
--- a/scene/gui/control.cpp
+++ b/scene/gui/control.cpp
@@ -447,7 +447,7 @@ void Control::_notification(int p_notification) {
Node *parent=this; //meh
- Node *parent_control=NULL;
+ Control *parent_control=NULL;
bool subwindow=false;
while(parent) {
@@ -463,8 +463,9 @@ void Control::_notification(int p_notification) {
break;
}
- if (parent->cast_to<Control>()) {
- parent_control=parent->cast_to<Control>();
+ parent_control=parent->cast_to<Control>();
+
+ if (parent_control) {
break;
} else if (ci) {