diff options
author | Sam Kottler <dev@samkottler.net> | 2020-08-20 19:40:02 +0300 |
---|---|---|
committer | Sam Kottler <dev@samkottler.net> | 2020-08-20 19:40:02 +0300 |
commit | 9dd50b39a433dc09b634d70ca8533ad19b4d1d5e (patch) | |
tree | 96341c40a13f620aa7f6a92fd6783dc6883216b0 /source/blender/editors/interface/interface_region_menu_popup.c | |
parent | 35624cdfe5186ee916e4519a013ef5c078d9c667 (diff) | |
parent | c74b4caa724bf74de41ba3928cdd824aa9ba59d2 (diff) |
Merge remote-tracking branch 'origin/blender-v2.90-release' into soc-2020-production-ready-light-tree-2soc-2020-production-ready-light-tree-2
Diffstat (limited to 'source/blender/editors/interface/interface_region_menu_popup.c')
-rw-r--r-- | source/blender/editors/interface/interface_region_menu_popup.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/source/blender/editors/interface/interface_region_menu_popup.c b/source/blender/editors/interface/interface_region_menu_popup.c index 077e8888d53..dbb072fa4a6 100644 --- a/source/blender/editors/interface/interface_region_menu_popup.c +++ b/source/blender/editors/interface/interface_region_menu_popup.c @@ -284,17 +284,10 @@ static uiBlock *ui_block_func_POPUP(bContext *C, uiPopupBlockHandle *handle, voi else { /* for a header menu we set the direction automatic */ if (!pup->slideout && flip) { - ScrArea *area = CTX_wm_area(C); ARegion *region = CTX_wm_region(C); - if (area && region) { - if (ELEM(region->regiontype, RGN_TYPE_HEADER, RGN_TYPE_TOOL_HEADER)) { - if (RGN_ALIGN_ENUM_FROM_MASK(ED_area_header_alignment(area)) == RGN_ALIGN_BOTTOM) { - UI_block_direction_set(block, UI_DIR_UP); - UI_block_order_flip(block); - } - } - if (region->regiontype == RGN_TYPE_FOOTER) { - if (RGN_ALIGN_ENUM_FROM_MASK(ED_area_footer_alignment(area)) == RGN_ALIGN_BOTTOM) { + if (region) { + if (RGN_TYPE_IS_HEADER_ANY(region->regiontype)) { + if (RGN_ALIGN_ENUM_FROM_MASK(region->alignment) == RGN_ALIGN_BOTTOM) { UI_block_direction_set(block, UI_DIR_UP); UI_block_order_flip(block); } |