Fix UI view drag target not using correct boundaries with panels

Initial idea was to calculate the view boundaries when finishing the
`uiBlock`, after layout code and such ran. But the panel code applies an
offset later, which breaks this. The view boundaries would be off by
something like 100px.
This commit is contained in:
2023-03-24 11:37:40 +01:00
parent 2fba27e6d8
commit 64f3afb267
2 changed files with 9 additions and 1 deletions

View File

@@ -1831,6 +1831,10 @@ void UI_panels_end(const bContext *C, ARegion *region, int *r_x, int *r_y)
LISTBASE_FOREACH (uiBlock *, block, &region->uiblocks) {
if (block->active && block->panel) {
ui_offset_panel_block(block);
/* Update bounds for all "views" in this block. Usually this is done in #UI_block_end(), but
* that wouldn't work because of the offset applied above. */
ui_block_views_bounds_calc(block);
}
}