diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-10-26 10:22:54 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-10-26 10:22:54 +0400 |
commit | dbde62d12416b75cc8dc0ce71bd101d8d8f42ef5 (patch) | |
tree | 31da398963786c08181f9d1fd96fe7e7994da100 /source/blender/windowmanager/intern/wm_operators.c | |
parent | 2d39533da8d69425759628f42acd80534c65c122 (diff) |
fix [#30087] operator_context is different for popup and submenu's *TODO, after 2.62*
having context different for menu vs submenu is quite confusing, now they are both: WM_OP_INVOKE_REGION_WIN
this changes WM_menu_invoke behavior.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_operators.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_operators.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 9a414f7ce1d..af6ec370fea 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -674,6 +674,8 @@ int WM_menu_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) else { pup = uiPupMenuBegin(C, RNA_struct_ui_name(op->type->srna), ICON_NONE); layout = uiPupMenuLayout(pup); + /* set this so the default execution context is the same as submenus */ + uiLayoutSetOperatorContext(layout, WM_OP_INVOKE_REGION_WIN); uiItemsFullEnumO(layout, op->type->idname, RNA_property_identifier(prop), op->ptr->data, WM_OP_EXEC_REGION_WIN, 0); uiPupMenuEnd(C, pup); } |