diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-07-31 03:37:46 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-07-31 03:38:01 +0300 |
commit | 1195a4a040ba8ecffd3221f5aa38c7be5272124b (patch) | |
tree | 31ccc833d5789b4b84ac788ef13e2f524267f95d /source/blender/editors/interface/interface_query.c | |
parent | 885cc4cf9a1d5c167e4cbd26c3294d8b1ad400d8 (diff) |
UI: add check for any kind of popup
Fixes T56155 when merging into 2.8
Diffstat (limited to 'source/blender/editors/interface/interface_query.c')
-rw-r--r-- | source/blender/editors/interface/interface_query.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface_query.c b/source/blender/editors/interface/interface_query.c index f7dbb9b14ed..1ad4a7d7f31 100644 --- a/source/blender/editors/interface/interface_query.c +++ b/source/blender/editors/interface/interface_query.c @@ -86,6 +86,14 @@ bool ui_block_is_pie_menu(const uiBlock *block) return ((block->flag & UI_BLOCK_RADIAL) != 0); } +bool ui_block_is_popup_any(const uiBlock *block) +{ + return ( + ui_block_is_menu(block) || + ui_block_is_pie_menu(block) + ); +} + bool UI_block_is_empty(const uiBlock *block) { for (const uiBut *but = block->buttons.first; but; but = but->next) { |