UI: support layout panels in popovers
Make use of UI_popup_dummy_panel_set so layout panels can be used.
This commit is contained in:
@@ -6136,11 +6136,16 @@ static bool ui_layout_has_panel_label(const uiLayout *layout, const PanelType *p
|
||||
|
||||
static void ui_paneltype_draw_impl(bContext *C, PanelType *pt, uiLayout *layout, bool show_header)
|
||||
{
|
||||
uiBlock *block = uiLayoutGetBlock(layout);
|
||||
Panel *panel = BKE_panel_new(pt);
|
||||
panel->flag = PNL_POPOVER;
|
||||
|
||||
if (pt->listener) {
|
||||
ui_block_add_dynamic_listener(uiLayoutGetBlock(layout), pt->listener);
|
||||
ui_block_add_dynamic_listener(block, pt->listener);
|
||||
}
|
||||
|
||||
if (block->handle) {
|
||||
UI_popup_dummy_panel_set(block->handle->region, block);
|
||||
}
|
||||
|
||||
uiLayout *last_item = static_cast<uiLayout *>(layout->items.last);
|
||||
|
||||
Reference in New Issue
Block a user