Propagate reshape_posted to and from parents

This commit is contained in:
Nikita Lisitsa 2022-02-19 16:39:43 +03:00
parent 2004f8043a
commit aca553c566

View file

@ -9,6 +9,11 @@ namespace psemek::ui
void element::set_parent(element * parent)
{
if (parent && reshape_posted_)
parent->root()->reshape_posted_ = true;
else if (!parent && parent_)
reshape_posted_ |= parent_->root()->reshape_posted_;
parent_ = parent;
if (loop())
post_delayed_callbacks();