mirror of
https://github.com/godotengine/godot.git
synced 2024-12-03 09:52:18 +08:00
Merge pull request #2936 from TheHX/pr-container
Add container automatic update when moving a child node
This commit is contained in:
commit
e4c872a260
@ -52,6 +52,14 @@ void Container::add_child_notify(Node *p_child) {
|
||||
|
||||
}
|
||||
|
||||
void Container::move_child_notify(Node *p_child) {
|
||||
|
||||
if (!p_child->cast_to<Control>())
|
||||
return;
|
||||
|
||||
queue_sort();
|
||||
}
|
||||
|
||||
void Container::remove_child_notify(Node *p_child) {
|
||||
|
||||
|
||||
|
@ -42,6 +42,7 @@ protected:
|
||||
|
||||
void queue_sort();
|
||||
virtual void add_child_notify(Node *p_child);
|
||||
virtual void move_child_notify(Node *p_child);
|
||||
virtual void remove_child_notify(Node *p_child);
|
||||
|
||||
void _notification(int p_what);
|
||||
|
Loading…
Reference in New Issue
Block a user