UI: Asset Shelf (Experimental Feature) #104831
|
@ -133,6 +133,12 @@ static uiBlock *ui_block_func_POPOVER(bContext *C, uiPopupBlockHandle *handle, v
|
|||
uiBlock *block = pup->block;
|
||||
int width, height;
|
||||
|
||||
/* in some cases we create the block before the region,
|
||||
* so we set it delayed here if necessary */
|
||||
if (BLI_findindex(&handle->region->uiblocks, block) == -1) {
|
||||
UI_block_region_set(block, handle->region);
|
||||
}
|
||||
|
||||
UI_block_layout_resolve(block, &width, &height);
|
||||
UI_block_direction_set(block, UI_DIR_DOWN | UI_DIR_CENTER_X);
|
||||
|
||||
|
|
Loading…
Reference in New Issue