UI: Asset Shelf (Experimental Feature) #104831

Closed
Julian Eisel wants to merge 399 commits from asset-shelf into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
1 changed files with 24 additions and 0 deletions
Showing only changes of commit 4dfa8b78cb - Show all commits

View File

@ -501,9 +501,33 @@ void ED_region_do_layout(bContext *C, ARegion *region)
region->do_draw |= RGN_DRAWING;
const int prev_area_flag = area ? area->flag : 0;
UI_SetTheme(area ? area->spacetype : 0, at->regionid);
at->layout(C, region);
/* Was the area just tagged for a size update? */
if (area && ((prev_area_flag & AREA_FLAG_REGION_SIZE_UPDATE) !=
(area->flag & AREA_FLAG_REGION_SIZE_UPDATE)))
{
/* Tag the following regions for redraw, since the size change of this region may affect the
* available space for them. */
for (ARegion *following_region = region->next; following_region;
following_region = following_region->next)
{
/* Overlapping and non-overlapping regions don't affect each others space. So layout changes
* of one don't require redrawing the other. */
if (region->overlap != following_region->overlap) {
continue;
}
/* Floating regions don't affect space of other regions. */
if (following_region->alignment == RGN_ALIGN_FLOAT) {
continue;
}
ED_region_tag_redraw(following_region);
}
}
/* Clear temporary update flag. */
region->flag &= ~RGN_FLAG_SEARCH_FILTER_UPDATE;
}