re-add boxes to parents every frame
This commit is contained in:
parent
fbf7882db2
commit
87d54b2ea6
@ -875,22 +875,19 @@ void UI_EndFrame(UI_Frame *frame)
|
||||
}
|
||||
|
||||
/* Update parent */
|
||||
if (box->parent != parent)
|
||||
if (box->parent)
|
||||
{
|
||||
if (box->parent)
|
||||
{
|
||||
/* Remove from old parent */
|
||||
DllQueueRemove(box->parent->first, box->parent->last, box);
|
||||
--box->parent->count;
|
||||
}
|
||||
if (parent)
|
||||
{
|
||||
/* Add to new parent */
|
||||
DllQueuePush(parent->first, parent->last, box);
|
||||
++parent->count;
|
||||
}
|
||||
box->parent = parent;
|
||||
/* Remove from old parent */
|
||||
DllQueueRemove(box->parent->first, box->parent->last, box);
|
||||
--box->parent->count;
|
||||
}
|
||||
if (parent)
|
||||
{
|
||||
/* Add to new parent */
|
||||
DllQueuePush(parent->first, parent->last, box);
|
||||
++parent->count;
|
||||
}
|
||||
box->parent = parent;
|
||||
|
||||
/* Update box */
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user