diff options
| author | Juan Linietsky | 2016-06-13 21:37:04 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2016-06-13 21:37:04 -0300 |
| commit | 4866713bc3ab58cd22ef5090a75b8a20e3b35e7d (patch) | |
| tree | b59f40fa5788225662d429a4c13b68be22779dbf /scene/gui/control.cpp | |
| parent | 26d63b559433c12c8208d36ab586d36e47752829 (diff) | |
| download | godot-4866713bc3ab58cd22ef5090a75b8a20e3b35e7d.tar.gz godot-4866713bc3ab58cd22ef5090a75b8a20e3b35e7d.tar.zst godot-4866713bc3ab58cd22ef5090a75b8a20e3b35e7d.zip | |
added a function CanvasItem.get_item_and_children_rect() , fixes #4738
Diffstat (limited to '')
| -rw-r--r-- | scene/gui/control.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index 534bcbf16..b122ab418 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) { |
