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>2018-11-16 01:19:33 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-11-16 01:19:33 +0300
commite0a30aef1998602ea8f865b82b9bbad238392351 (patch)
tree7b3c5a5eb02c35aecdfcc25d76ed129bddadbef6
parent088be7eb2f650f7849e3af33cbea76f7b3af0822 (diff)
WM: Fix secondary toolbar events being ignored
Error in recent workaround.
-rw-r--r--release/scripts/startup/bl_operators/wm.py17
1 files changed, 8 insertions, 9 deletions
diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py
index a45013583d6..c770746666d 100644
--- a/release/scripts/startup/bl_operators/wm.py
+++ b/release/scripts/startup/bl_operators/wm.py
@@ -2393,9 +2393,9 @@ class WM_OT_tool_set_by_name(Operator):
if not self.properties.is_property_set("name"):
WM_OT_toolbar._key_held = False
return {'PASS_THROUGH'}
- elif WM_OT_toolbar._key_held and event.value != 'RELEASE':
+ elif (WM_OT_toolbar._key_held == event.type) and (event.value != 'RELEASE'):
return {'PASS_THROUGH'}
- WM_OT_toolbar._key_held = False
+ WM_OT_toolbar._key_held = None
return self.execute(context)
@@ -2422,13 +2422,16 @@ class WM_OT_toolbar(Operator):
bl_idname = "wm.toolbar"
bl_label = "Toolbar"
- if use_toolbar_release_hack:
- _key_held = False
-
@classmethod
def poll(cls, context):
return context.space_data is not None
+ if use_toolbar_release_hack:
+ _key_held = None
+ def invoke(self, context, event):
+ WM_OT_toolbar._key_held = event.type
+ return self.execute(context)
+
def execute(self, context):
from bl_ui.space_toolsystem_common import (
ToolSelectPanelHelper,
@@ -2444,10 +2447,6 @@ class WM_OT_toolbar(Operator):
keymap = keymap_from_context(context, space_type)
def draw_menu(popover, context):
- if use_toolbar_release_hack:
- # Release event sets false.
- WM_OT_toolbar._key_held = True
-
layout = popover.layout
layout.operator_context = 'INVOKE_REGION_WIN'
cls.draw_cls(layout, context, detect_layout=False, scale_y=1.0)