Fix: Node tools shortcuts don't display in menus

Since the menus are defined in the header region, but the keymap is part
of the 3D view window region, we need to specify that when creating the
operator buttons.
This commit is contained in:
Hans Goudey
2023-09-25 21:41:50 -04:00
parent 2aa393e727
commit 34a1b5bdbd

View File

@@ -660,7 +660,7 @@ static void catalog_assets_draw(const bContext *C, Menu *menu)
IFACE_(asset->get_name().c_str()),
ICON_NONE,
nullptr,
WM_OP_INVOKE_DEFAULT,
WM_OP_INVOKE_REGION_WIN,
UI_ITEM_NONE,
&props_ptr);
asset::operator_asset_reference_props_set(*asset, props_ptr);
@@ -703,7 +703,7 @@ static void catalog_assets_draw_unassigned(const bContext *C, Menu *menu)
IFACE_(asset->get_name().c_str()),
ICON_NONE,
nullptr,
WM_OP_INVOKE_DEFAULT,
WM_OP_INVOKE_REGION_WIN,
UI_ITEM_NONE,
&props_ptr);
asset::operator_asset_reference_props_set(*asset, props_ptr);