diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-04-23 19:22:22 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-04-23 19:22:22 +0400 |
commit | e5a968276ef567710b0fc286f602fb4313fb5a1d (patch) | |
tree | d01ff411b6f6ae894d57d2b0e6b74d46a493047c /source/blender/editors/interface/interface.c | |
parent | c96ab45324e83ff27229f71e43bb112cec14da3a (diff) |
fix [#35055] Crash in Edit Source feature for multilevel menus
dont show the option when operating on a menu since its not supported.
Diffstat (limited to 'source/blender/editors/interface/interface.c')
-rw-r--r-- | source/blender/editors/interface/interface.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index 80c8d3c0ea4..7ddf85707fe 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -94,6 +94,13 @@ static void ui_free_but(const bContext *C, uiBut *but); +bool ui_block_is_menu(const uiBlock *block) +{ + return (((block->flag & UI_BLOCK_LOOP) != 0) && + /* non-menu popups use keep-open, so check this is off */ + ((block->flag & UI_BLOCK_KEEP_OPEN) == 0)); +} + /* ************* window matrix ************** */ void ui_block_to_window_fl(const ARegion *ar, uiBlock *block, float *x, float *y) |