Fix: Sub-panel backdrop sometimes draws when closed
My last cleanup commit for this function missed this case. It likely happens because the panel's block size doesn't update properly somewhere. Short of investigating that right now, it makes sense to return early in this case anyway.
This commit is contained in:
parent
e9607f45d8
commit
038828f49a
|
@ -1166,6 +1166,10 @@ static void panel_draw_aligned_backdrop(const Panel *panel,
|
|||
const bool is_subpanel = panel->type->parent != NULL;
|
||||
const bool is_open = !UI_panel_is_closed(panel);
|
||||
|
||||
if (is_subpanel && !is_open) {
|
||||
return;
|
||||
}
|
||||
|
||||
const uint pos = GPU_vertformat_attr_add(
|
||||
immVertexFormat(), "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT);
|
||||
|
||||
|
|
Loading…
Reference in New Issue