Show tool title for favorites menu

This commit is contained in:
Philipp Oeser 2018-12-04 16:14:21 +11:00 committed by Campbell Barton
parent 61678ca8ae
commit b16f03566b
Notes: blender-bot 2023-02-14 07:53:51 +01:00
Referenced by issue #58730, Input of math operations (other than minus) while using tools broken
1 changed files with 6 additions and 0 deletions

View File

@ -275,6 +275,12 @@ static void ui_but_user_menu_add(bContext *C, uiBut *but, bUserMenu *um)
MenuType *mt = NULL;
if (but->optype) {
if (drawstr[0] == '\0') {
/* Hard code overrides for generic operators. */
if (UI_but_is_tool(but)) {
RNA_string_get(but->opptr, "name", drawstr);
}
}
ED_screen_user_menu_item_add_operator(
&um->items, drawstr,
but->optype, but->opptr ? but->opptr->data : NULL, but->opcontext);