Fix #114901: Shortcut assigned to pack island not showing in menu

`wm_keymap_item_find_props()` finds the keyitem for respective operator.
This function expects opcontext to be `WM_OP_EXEC/INVOKE_REGION_WIN`.
Set operator_context to `INVOKE_REGION_WIN` in UI drawing code for pack
island button, this will allow drawing shortcut key infront of the label.

Pull Request: https://projects.blender.org/blender/blender/pulls/133298
This commit is contained in:
Pratik Borhade
2025-01-21 01:57:56 +01:00
committed by Harley Acheson
parent b36eb69038
commit 8dde2f6689

View File

@@ -462,7 +462,7 @@ class IMAGE_MT_uvs(Menu):
layout.separator()
layout.operator_context = 'INVOKE_DEFAULT'
layout.operator_context = 'INVOKE_REGION_WIN'
layout.operator("uv.pack_islands")
layout.operator_context = 'EXEC_REGION_WIN'
layout.operator("uv.average_islands_scale")