Fix T62945: Hotkeys not showing up in brush tooltips
This commit is contained in:
parent
9dadd8bdb1
commit
720e19a833
Notes:
blender-bot
2023-02-14 08:08:54 +01:00
Referenced by issue #62945, Shortcuts don't appear on tooltips for tool icons.
|
@ -527,7 +527,10 @@ static uiTooltipData *ui_tooltip_data_from_tool(bContext *C, uiBut *but, bool is
|
|||
const char *tool_attr = BKE_paint_get_tool_prop_id_from_paintmode(paint_mode);
|
||||
if (tool_attr != NULL) {
|
||||
const EnumPropertyItem *items = BKE_paint_get_tool_enum_from_paintmode(paint_mode);
|
||||
const int i = RNA_enum_from_name(items, tool_id);
|
||||
const char *tool_id_lstrip = strrchr(tool_id, '.');
|
||||
const int tool_id_offset = tool_id_lstrip ? ((tool_id_lstrip - tool_id) + 1) : 0;
|
||||
const int i = RNA_enum_from_name(items, tool_id + tool_id_offset);
|
||||
|
||||
if (i != -1) {
|
||||
wmOperatorType *ot = WM_operatortype_find("paint.brush_select", true);
|
||||
PointerRNA op_props;
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 284f78b77d137687bc7bed17c945ef651721cccf
|
||||
Subproject commit c1586ae29595713b597c22f6baa08d6cce423767
|
Loading…
Reference in New Issue