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:
@@ -1831,6 +1831,10 @@ void UI_panels_end(const bContext *C, ARegion *region, int *r_x, int *r_y)
|
||||
LISTBASE_FOREACH (uiBlock *, block, ®ion->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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user