diff options
author | Campbell Barton <campbell@blender.org> | 2022-02-24 14:48:34 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-02-25 09:58:22 +0300 |
commit | ad0b3abf539bbb358f799d3f36649b5d46f222c8 (patch) | |
tree | d7aff552c5541880ca1ce2648595455418cafc56 /source/blender/windowmanager/gizmo | |
parent | e7cae5187773f41e62830be597c6f598bff0653f (diff) |
Cleanup: use flags for wmEvent modifier keys
Using flags makes checking multiple modifiers at once more convenient
and avoids macros/functions such as IS_EVENT_MOD & WM_event_modifier_flag
which have been removed. It also simplifies checking if modifier keys
have changed.
Diffstat (limited to 'source/blender/windowmanager/gizmo')
-rw-r--r-- | source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c b/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c index ad902f0963e..f1ac19f4651 100644 --- a/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c +++ b/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c @@ -819,8 +819,6 @@ wmGizmo *wm_gizmomap_highlight_find(wmGizmoMap *gzmap, do_step[i] = WM_gizmo_context_check_drawstep(C, i); } - const int event_modifier = WM_event_modifier_flag(event); - LISTBASE_FOREACH (wmGizmoGroup *, gzgroup, &gzmap->groups) { /* If it were important we could initialize here, @@ -839,11 +837,11 @@ wmGizmo *wm_gizmomap_highlight_find(wmGizmoMap *gzmap, } if (step == WM_GIZMOMAP_DRAWSTEP_3D) { wm_gizmogroup_intersectable_gizmos_to_list( - wm, gzgroup, event_modifier, &visible_3d_gizmos); + wm, gzgroup, event->modifier, &visible_3d_gizmos); } else if (step == WM_GIZMOMAP_DRAWSTEP_2D) { if ((gz = wm_gizmogroup_find_intersected_gizmo( - wm, gzgroup, C, event_modifier, event->mval, r_part))) { + wm, gzgroup, C, event->modifier, event->mval, r_part))) { break; } } |