Fix #109427: Shortcut missing in animation editors channel context menu

Specifying the correct operator context (`INVOKE_REGION_CHANNELS` in
this case) is mandatory, otherwise looking up the shortcut in
`wm_keymap_item_find_props` will fetch the wrong region
(`RGN_TYPE_WINDOW` not `RGN_TYPE_CHANNELS`) and thus wont find the keymap
item in that region keymap.

This was already done for the other menus, not for the context menu
though.

Pull Request: https://projects.blender.org/blender/blender/pulls/111376
This commit is contained in:
Philipp Oeser 2023-08-23 09:40:27 +02:00 committed by Philipp Oeser
parent e2a35debde
commit b4c380acb4
1 changed files with 2 additions and 0 deletions

View File

@ -719,6 +719,8 @@ class DOPESHEET_MT_channel_context_menu(Menu):
# This menu is used from the graph editor too.
is_graph_editor = context.area.type == 'GRAPH_EDITOR'
layout.operator_context = 'INVOKE_REGION_CHANNELS'
layout.separator()
layout.operator("anim.channels_view_selected")