re-add boxes to parents every frame

This commit is contained in:
jacob 2025-12-19 16:00:01 -06:00
parent fbf7882db2
commit 87d54b2ea6

View File

@ -875,22 +875,19 @@ void UI_EndFrame(UI_Frame *frame)
} }
/* Update parent */ /* Update parent */
if (box->parent != parent) if (box->parent)
{ {
if (box->parent) /* Remove from old parent */
{ DllQueueRemove(box->parent->first, box->parent->last, box);
/* Remove from old parent */ --box->parent->count;
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;
} }
if (parent)
{
/* Add to new parent */
DllQueuePush(parent->first, parent->last, box);
++parent->count;
}
box->parent = parent;
/* Update box */ /* Update box */
{ {