Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2020-11-18 23:54:41 +0300
committerHans Goudey <h.goudey@me.com>2020-11-18 23:54:41 +0300
commit038828f49a4f50901684a059fc990626c13e6949 (patch)
tree8c9a13db01e62bde9baf7fde3833814f30df5592 /source/blender/editors/interface/interface_panel.c
parente9607f45d85df6df834a80f147b8c42ff12f56f2 (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/blender/editors/interface/interface_panel.c')
-rw-r--r--source/blender/editors/interface/interface_panel.c4
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);