diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-05-19 11:22:44 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-05-19 11:25:52 +0300 |
commit | d3c89f50a0167cb978daf3eda064bc7f36167de8 (patch) | |
tree | ac7931356704dc3cf3577011e30ab048deb0840a /source/blender/editors/interface/interface_region_popover.c | |
parent | 671797e22e1a5d2cb9f7df9d30012d8a38962ad2 (diff) |
UI: Use popover for toolbar popup operator
- Currently the popup closes immediately, could be made configurable.
- Support exiting popups when their submenu's are accessed.
Diffstat (limited to 'source/blender/editors/interface/interface_region_popover.c')
-rw-r--r-- | source/blender/editors/interface/interface_region_popover.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface_region_popover.c b/source/blender/editors/interface/interface_region_popover.c index 219a4fc8ed5..fcfbc3027d0 100644 --- a/source/blender/editors/interface/interface_region_popover.c +++ b/source/blender/editors/interface/interface_region_popover.c @@ -250,6 +250,11 @@ void UI_popover_end(bContext *C, uiPopover *pup) UI_popup_handlers_add(C, &window->modalhandlers, handle, 0); WM_event_add_mousemove(C); handle->popup = true; + + /* TODO(campbell): we may want to make this configurable. + * The begin/end stype of calling popups doesn't allow to 'can_refresh' to be set. + * For now close this style of popvers when accessed. */ + UI_block_flag_disable(pup->block, UI_BLOCK_KEEP_OPEN); } uiLayout *UI_popover_layout(uiPopover *pup) |