diff options
author | Markus Sauermann <6299227+Sauermann@users.noreply.github.com> | 2022-10-16 19:41:42 +0200 |
---|---|---|
committer | Markus Sauermann <6299227+Sauermann@users.noreply.github.com> | 2022-10-16 21:42:16 +0200 |
commit | 13b87c13c7de36e5258ff16500ae15a9a9041525 (patch) | |
tree | be1b3bca5705b243459a39ea845b1a159993480b /scene/gui/control.h | |
parent | 3a59c833f1b7e34ddef57522800288a0dee8562d (diff) | |
download | redot-engine-13b87c13c7de36e5258ff16500ae15a9a9041525.tar.gz |
Fix set_as_toplevel event propagation to child
In certain conditions events did not get propagated to Control childs of
Node2D nodes when setting a parent of the Node2D to toplevel.
This patch makes sure that such Control nodes become root control in the
viewport.
Diffstat (limited to 'scene/gui/control.h')
-rw-r--r-- | scene/gui/control.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/scene/gui/control.h b/scene/gui/control.h index e526690cbe..97b5c54d18 100644 --- a/scene/gui/control.h +++ b/scene/gui/control.h @@ -288,6 +288,9 @@ private: void _update_minimum_size(); void _size_changed(); + void _toplevel_changed() override{}; // Controls don't need to do anything, only other CanvasItems. + void _toplevel_changed_on_parent() override; + void _clear_size_warning(); // Input events. |