Merge pull request #2936 from TheHX/pr-container

Add container automatic update when moving a child node
This commit is contained in:
Rémi Verschelde 2015-11-28 17:16:54 +01:00
commit e4c872a260
2 changed files with 9 additions and 0 deletions

View File

@ -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) {

View File

@ -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);