diff options
author | Joseph Eagar <joeedh@gmail.com> | 2022-04-29 09:13:53 +0300 |
---|---|---|
committer | Joseph Eagar <joeedh@gmail.com> | 2022-04-29 09:13:53 +0300 |
commit | 720e19a83325be62a68a777897fb706a23854cf7 (patch) | |
tree | 650b9be418639e9c83506d83cb41dfd55c611034 /source | |
parent | 9dadd8bdb101fd5c06cd6ca7aa708a6ce6f13d47 (diff) |
Fix T62945: Hotkeys not showing up in brush tooltips
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/interface/interface_region_tooltip.c | 5 | ||||
m--------- | source/tools | 0 |
2 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_region_tooltip.c b/source/blender/editors/interface/interface_region_tooltip.c index ca18ec14a54..c7ebecb178b 100644 --- a/source/blender/editors/interface/interface_region_tooltip.c +++ b/source/blender/editors/interface/interface_region_tooltip.c @@ -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; diff --git a/source/tools b/source/tools -Subproject 284f78b77d137687bc7bed17c945ef651721ccc +Subproject c1586ae29595713b597c22f6baa08d6cce42376 |