[ui] Use View_Delete to delete the view

It's there for a reason :P. Fixes most of the really bad behavior after
disabling some widgets (re-layout isn't working at all, though, and
adding the widgets back again puts them in the wrong place).
This commit is contained in:
Bill Currie 2023-07-02 16:40:05 +09:00
parent 7c17921277
commit a6a0b6cb63

View file

@ -242,7 +242,7 @@ prune_objects (imui_ctx_t *ctx)
if ((*s)->frame_count == ctx->frame_count) {
s = &(*s)->next;
} else {
ECS_DelEntity (ctx->csys.reg, (*s)->entity);
View_Delete (View_FromEntity (ctx->vsys, (*s)->entity));
Hash_Del (ctx->tab, (*s)->label + (*s)->key_offset);
imui_state_free (ctx, *s);
}