Show tool title for favorites menu
This commit is contained in:
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
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue