diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-08-09 16:10:54 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-08-10 01:14:22 +0300 |
commit | 3daf5cc1ceb4854ba7ca481b9e2f1a5ed19bd2cb (patch) | |
tree | 5c1b49497d66ec2f6fb010e9ff60d29bdcde106f /source/blender/windowmanager/gizmo | |
parent | eb7b450c0c65388758fcec5764a759d3d347c314 (diff) |
Gizmo: 2d select now takes region coords
Was taking an event, when only the region coords are needed.
Diffstat (limited to 'source/blender/windowmanager/gizmo')
-rw-r--r-- | source/blender/windowmanager/gizmo/intern/wm_gizmo_group.c | 2 | ||||
-rw-r--r-- | source/blender/windowmanager/gizmo/wm_gizmo_fn.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/windowmanager/gizmo/intern/wm_gizmo_group.c b/source/blender/windowmanager/gizmo/intern/wm_gizmo_group.c index 204662b5713..5efc74b5bb8 100644 --- a/source/blender/windowmanager/gizmo/intern/wm_gizmo_group.c +++ b/source/blender/windowmanager/gizmo/intern/wm_gizmo_group.c @@ -153,7 +153,7 @@ wmGizmo *wm_gizmogroup_find_intersected_gizmo( { for (wmGizmo *gz = gzgroup->gizmos.first; gz; gz = gz->next) { if (gz->type->test_select && (gz->flag & WM_GIZMO_HIDDEN) == 0) { - if ((*r_part = gz->type->test_select(C, gz, event)) != -1) { + if ((*r_part = gz->type->test_select(C, gz, event->mval)) != -1) { return gz; } } diff --git a/source/blender/windowmanager/gizmo/wm_gizmo_fn.h b/source/blender/windowmanager/gizmo/wm_gizmo_fn.h index a94f1e994e9..88065a0fcd5 100644 --- a/source/blender/windowmanager/gizmo/wm_gizmo_fn.h +++ b/source/blender/windowmanager/gizmo/wm_gizmo_fn.h @@ -51,7 +51,7 @@ typedef void (*wmGizmoGroupFnMsgBusSubscribe)( typedef void (*wmGizmoFnSetup)(struct wmGizmo *); typedef void (*wmGizmoFnDraw)(const struct bContext *, struct wmGizmo *); typedef void (*wmGizmoFnDrawSelect)(const struct bContext *, struct wmGizmo *, int); -typedef int (*wmGizmoFnTestSelect)(struct bContext *, struct wmGizmo *, const struct wmEvent *); +typedef int (*wmGizmoFnTestSelect)(struct bContext *, struct wmGizmo *, const int mval[2]); typedef int (*wmGizmoFnModal)(struct bContext *, struct wmGizmo *, const struct wmEvent *, eWM_GizmoFlagTweak); typedef void (*wmGizmoFnPropertyUpdate)(struct wmGizmo *, struct wmGizmoProperty *); typedef void (*wmGizmoFnMatrixBasisGet)(const struct wmGizmo *, float[4][4]); |