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
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')
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c2
-rw-r--r--source/blender/windowmanager/intern/wm_window.c2
2 files changed, 3 insertions, 1 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);
}
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c
index 3b0660f4301..7d5dc858b00 100644
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@ -1080,7 +1080,7 @@ char *WM_clipboard_text_get(int selection)
return NULL;
/* always convert from \r\n to \n */
- newbuf = MEM_callocN(strlen(buf) + 1, "WM_clipboard_text_get");
+ newbuf = MEM_callocN(strlen(buf) + 1, __func__);
for (p = buf, p2 = newbuf; *p; p++) {
if (*p != '\r')