Fix background drawing in tool header after changing tools

After changing tools (and possibly other context), the buttons section
background drawing would be broken for one redraw, so the full region
would be drawn with a background, rather than just behind the button
boundaries.
This commit is contained in:
Julian Eisel
2023-09-27 12:23:07 +02:00
parent 8c25952886
commit 7ec7dac860

View File

@@ -61,6 +61,10 @@ static Vector<rcti> button_section_bounds_calc(const ARegion *region, const bool
BLI_rcti_init_minmax(&cur_section_bounds);
LISTBASE_FOREACH (uiBlock *, block, &region->uiblocks) {
if (!block->active) {
continue;
}
LISTBASE_FOREACH (uiBut *, but, &block->buttons) {
if (but->type == UI_BTYPE_SEPR_SPACER) {
/* Start a new section. */