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/intern/wm_operators.c | |
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/intern/wm_operators.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_operators.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index a476fb4fa13..6b8f7309d80 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -2822,7 +2822,7 @@ static int radial_control_modal(bContext *C, wmOperator *op, const wmEvent *even float numValue; /* TODO: fix hardcoded events */ - bool snap = event->ctrl != 0; + bool snap = (event->modifier & KM_CTRL) != 0; /* Modal numinput active, try to handle numeric inputs first... */ if (event->val == KM_PRESS && has_numInput && handleNumInput(C, &rc->num_input, event)) { |