From 87d54b2ea6fab44019725c53a627278a3e3abb65 Mon Sep 17 00:00:00 2001 From: jacob Date: Fri, 19 Dec 2025 16:00:01 -0600 Subject: [PATCH] re-add boxes to parents every frame --- src/ui/ui_core.c | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/src/ui/ui_core.c b/src/ui/ui_core.c index adbf7fa5..535bdff7 100644 --- a/src/ui/ui_core.c +++ b/src/ui/ui_core.c @@ -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 */ {