diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-04-23 02:32:42 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-04-23 02:32:42 +0400 |
commit | 0d14a1414c1c36f0e887c11de137f8b32a788852 (patch) | |
tree | 18d480e5008f64bb04517a63432f523326cfcd33 /source/blender | |
parent | e066b077fb8cae95576b6e4db3fc5bb07e4ab358 (diff) |
fix for UI annoyance with popups (such as new image popup) opening their menus to the right of the button.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/interface/interface_regions.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c index c1bfa2dc799..d8a49fa86d9 100644 --- a/source/blender/editors/interface/interface_regions.c +++ b/source/blender/editors/interface/interface_regions.c @@ -2440,7 +2440,11 @@ uiPopupBlockHandle *ui_popup_menu_create(bContext *C, ARegion *butregion, uiBut pup->block = uiBeginBlock(C, NULL, __func__, UI_EMBOSSP); pup->block->flag |= UI_BLOCK_NUMSELECT; /* default menus to numselect */ pup->layout = uiBlockLayout(pup->block, UI_LAYOUT_VERTICAL, UI_LAYOUT_MENU, 0, 0, 200, 0, style); - pup->slideout = (but && (but->block->flag & UI_BLOCK_LOOP)); + pup->slideout = (but && + /* check this is a menu */ + ((but->block->flag & UI_BLOCK_LOOP) != 0) && + /* non-menu popups use keep-open, so check this is off */ + ((but->block->flag & UI_BLOCK_KEEP_OPEN) == 0)); pup->but = but; uiLayoutSetOperatorContext(pup->layout, WM_OP_INVOKE_REGION_WIN); |