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_handlers.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_handlers.c')
-rw-r--r-- | source/blender/editors/interface/interface_handlers.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index dcad65c3f48..055cceeb4ea 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -5338,7 +5338,9 @@ static bool ui_but_menu(bContext *C, uiBut *but) } /* perhaps we should move this into (G.debug & G_DEBUG) - campbell */ - uiItemFullO(layout, "UI_OT_editsource", NULL, ICON_NONE, NULL, WM_OP_INVOKE_DEFAULT, 0); + if (ui_block_is_menu(but->block) == false) { + uiItemFullO(layout, "UI_OT_editsource", NULL, ICON_NONE, NULL, WM_OP_INVOKE_DEFAULT, 0); + } uiItemFullO(layout, "UI_OT_edittranslation_init", NULL, ICON_NONE, NULL, WM_OP_INVOKE_DEFAULT, 0); uiPupMenuEnd(C, pup); |