Add container automatic update when moving a child node
This commit is contained in:
parent
274b17b636
commit
43e1b879d0
|
@ -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