fix [#35055] Crash in Edit Source feature for multilevel menus

dont show the option when operating on a menu since its not supported.
This commit is contained in:
2013-04-23 15:22:22 +00:00
parent c96ab45324
commit e5a968276e
4 changed files with 15 additions and 8 deletions

View File

@@ -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);