Commit: e0a30aef1998602ea8f865b82b9bbad238392351 Author: Campbell Barton Date: Fri Nov 16 09:19:33 2018 +1100 Branches: blender2.8 https://developer.blender.org/rBe0a30aef1998602ea8f865b82b9bbad238392351
WM: Fix secondary toolbar events being ignored Error in recent workaround. =================================================================== M release/scripts/startup/bl_operators/wm.py =================================================================== 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) _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs