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 <campbell@blender.org>2022-02-24 14:48:34 +0300
committerCampbell Barton <campbell@blender.org>2022-02-25 09:58:22 +0300
commitad0b3abf539bbb358f799d3f36649b5d46f222c8 (patch)
treed7aff552c5541880ca1ce2648595455418cafc56 /source/blender/editors/object/object_transform.c
parente7cae5187773f41e62830be597c6f598bff0653f (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/editors/object/object_transform.c')
-rw-r--r--source/blender/editors/object/object_transform.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c
index 94aa7d59f9d..9e82abf4d07 100644
--- a/source/blender/editors/object/object_transform.c
+++ b/source/blender/editors/object/object_transform.c
@@ -1861,7 +1861,7 @@ static int object_transform_axis_target_modal(bContext *C, wmOperator *op, const
view3d_operator_needs_opengl(C);
- const bool is_translate = (event->ctrl != 0);
+ const bool is_translate = event->modifier & KM_CTRL;
const bool is_translate_init = is_translate && (xfd->is_translate != is_translate);
if (event->type == MOUSEMOVE || is_translate_init) {