[Bf-blender-cvs] [4893b8c693c] blender2.8: Fix toolbar popup outside the window region
Campbell Barton
noreply at git.blender.org
Mon Sep 3 02:15:07 CEST 2018
Commit: 4893b8c693c645622015c47ed922f3e17a26830f
Author: Campbell Barton
Date: Mon Sep 3 10:19:30 2018 +1000
Branches: blender2.8
https://developer.blender.org/rB4893b8c693c645622015c47ed922f3e17a26830f
Fix toolbar popup outside the window region
===================================================================
M release/scripts/startup/bl_operators/wm.py
M release/scripts/startup/bl_ui/space_toolsystem_common.py
===================================================================
diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py
index 0ccdd3cf5c6..da4ba10a9bf 100644
--- a/release/scripts/startup/bl_operators/wm.py
+++ b/release/scripts/startup/bl_operators/wm.py
@@ -2407,7 +2407,7 @@ class WM_OT_toolbar(Operator):
def draw_menu(popover, context):
layout = popover.layout
- layout.operator_context = 'INVOKE_DEFAULT'
+ layout.operator_context = 'INVOKE_REGION_WIN'
layout.operator("wm.search_menu", text="Search Commands...", icon='VIEWZOOM')
cls.draw_cls(layout, context, detect_layout=False, scale_y=1.0)
diff --git a/release/scripts/startup/bl_ui/space_toolsystem_common.py b/release/scripts/startup/bl_ui/space_toolsystem_common.py
index 1be86ea7c1c..d338855a8e4 100644
--- a/release/scripts/startup/bl_ui/space_toolsystem_common.py
+++ b/release/scripts/startup/bl_ui/space_toolsystem_common.py
@@ -740,12 +740,14 @@ def keymap_from_context(context, space_type):
if item.operator is not None:
kmi_found = wm.keyconfigs.find_item_from_operator(
idname=item.operator,
+ context='INVOKE_REGION_WIN',
)[1]
elif item.keymap is not None:
kmi_first = item.keymap[0].keymap_items[0]
kmi_found = wm.keyconfigs.find_item_from_operator(
idname=kmi_first.idname,
# properties=kmi_first.properties, # prevents matches, don't use.
+ context='INVOKE_REGION_WIN',
)[1]
del kmi_first
else:
@@ -863,7 +865,10 @@ def keymap_from_context(context, space_type):
if True:
# The shortcut will show, so we better support running it.
- kmi_search = wm.keyconfigs.find_item_from_operator(idname="wm.search_menu")[1]
+ kmi_search = wm.keyconfigs.find_item_from_operator(
+ idname="wm.search_menu",
+ context='INVOKE_REGION_WIN',
+ )[1]
if kmi_search:
keymap.keymap_items.new(
"wm.search_menu",
More information about the Bf-blender-cvs
mailing list