diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-12-12 01:39:36 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-12-12 01:40:37 +0300 |
commit | 220ab6290e55a67778d6fbf82467a2170fbee413 (patch) | |
tree | 79fcf835a81e47a6df884e1cf98fa34d29a25902 | |
parent | d1237d24ca8e98536c2a2a05c0143b5fe61e8144 (diff) |
Fix toolbar key-accelerator w/ LMB select
Tweak events were masking hotkey access.
Reported in T55162
-rw-r--r-- | release/scripts/modules/bl_keymap_utils/keymap_from_toolbar.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/release/scripts/modules/bl_keymap_utils/keymap_from_toolbar.py b/release/scripts/modules/bl_keymap_utils/keymap_from_toolbar.py index 501b15c3dc3..7f85faa4ba6 100644 --- a/release/scripts/modules/bl_keymap_utils/keymap_from_toolbar.py +++ b/release/scripts/modules/bl_keymap_utils/keymap_from_toolbar.py @@ -129,7 +129,10 @@ def generate(context, space_type): kmi_hack_brush_select.active = False if use_release_confirm or use_tap_reset: - kmi_toolbar = wm.keyconfigs.find_item_from_operator(idname="wm.toolbar")[1] + kmi_toolbar = wm.keyconfigs.find_item_from_operator( + idname="wm.toolbar", + is_hotkey=True, + )[1] kmi_toolbar_type = None if not kmi_toolbar else kmi_toolbar.type if use_tap_reset and kmi_toolbar_type is not None: kmi_toolbar_args_type_only = {"type": kmi_toolbar_type} @@ -148,6 +151,7 @@ def generate(context, space_type): context='INVOKE_REGION_WIN', # properties={"name": item.text}, properties=kmi_hack_properties, + is_hotkey=True, )[1] if kmi_found: use_tap_reset = False @@ -180,6 +184,7 @@ def generate(context, space_type): context='INVOKE_REGION_WIN', # properties={"name": item.text}, properties=kmi_hack_properties, + is_hotkey=True, )[1] if kmi_found is None: @@ -200,6 +205,7 @@ def generate(context, space_type): idname="paint.brush_select", context='INVOKE_REGION_WIN', properties=kmi_hack_brush_select_properties, + is_hotkey=True, )[1] else: print("Unsupported mode:", mode) @@ -214,6 +220,7 @@ def generate(context, space_type): kmi_found = wm.keyconfigs.find_item_from_operator( idname=item.operator, context='INVOKE_REGION_WIN', + is_hotkey=True, )[1] elif item.keymap is not None: km = keyconf.keymaps.get(item.keymap[0]) @@ -228,6 +235,7 @@ def generate(context, space_type): idname=kmi_first.idname, # properties=kmi_first.properties, # prevents matches, don't use. context='INVOKE_REGION_WIN', + is_hotkey=True, )[1] else: kmi_found = None |