Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-10-26 10:22:54 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-10-26 10:22:54 +0400
commitdbde62d12416b75cc8dc0ce71bd101d8d8f42ef5 (patch)
tree31da398963786c08181f9d1fd96fe7e7994da100 /source/blender/windowmanager/intern/wm_operators.c
parent2d39533da8d69425759628f42acd80534c65c122 (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.c2
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);
}