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-08-09 16:10:54 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-08-10 01:14:22 +0300
commit3daf5cc1ceb4854ba7ca481b9e2f1a5ed19bd2cb (patch)
tree5c1b49497d66ec2f6fb010e9ff60d29bdcde106f /source/blender/editors/gizmo_library/gizmo_types/arrow2d_gizmo.c
parenteb7b450c0c65388758fcec5764a759d3d347c314 (diff)
Gizmo: 2d select now takes region coords
Was taking an event, when only the region coords are needed.
Diffstat (limited to 'source/blender/editors/gizmo_library/gizmo_types/arrow2d_gizmo.c')
-rw-r--r--source/blender/editors/gizmo_library/gizmo_types/arrow2d_gizmo.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/gizmo_library/gizmo_types/arrow2d_gizmo.c b/source/blender/editors/gizmo_library/gizmo_types/arrow2d_gizmo.c
index cb8e2a90b07..953e763a33c 100644
--- a/source/blender/editors/gizmo_library/gizmo_types/arrow2d_gizmo.c
+++ b/source/blender/editors/gizmo_library/gizmo_types/arrow2d_gizmo.c
@@ -140,15 +140,15 @@ static int gizmo_arrow2d_invoke(
}
static int gizmo_arrow2d_test_select(
- bContext *UNUSED(C), wmGizmo *gz, const wmEvent *event)
+ bContext *UNUSED(C), wmGizmo *gz, const int mval[2])
{
- const float mval[2] = {event->mval[0], event->mval[1]};
+ const float mval_fl[2] = {UNPACK2(mval)};
const float arrow_length = RNA_float_get(gz->ptr, "length");
const float arrow_angle = RNA_float_get(gz->ptr, "angle");
const float line_len = arrow_length * gz->scale_final;
float mval_local[2];
- copy_v2_v2(mval_local, mval);
+ copy_v2_v2(mval_local, mval_fl);
sub_v2_v2(mval_local, gz->matrix_basis[3]);
float line[2][2];