diff options
author | Hans Goudey <h.goudey@me.com> | 2020-11-18 23:54:41 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2020-11-18 23:54:41 +0300 |
commit | 038828f49a4f50901684a059fc990626c13e6949 (patch) | |
tree | 8c9a13db01e62bde9baf7fde3833814f30df5592 /source | |
parent | e9607f45d85df6df834a80f147b8c42ff12f56f2 (diff) |
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.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/interface/interface_panel.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c index 6d376a0b73d..839363c9599 100644 --- a/source/blender/editors/interface/interface_panel.c +++ b/source/blender/editors/interface/interface_panel.c @@ -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); |