diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-04-16 17:21:30 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-04-16 17:21:30 +0300 |
commit | c7a8bcfa37fa09b038c8a6f83b1462b915229670 (patch) | |
tree | a30208385969f8e371dba79cce75bc8f15778aeb /source/blender | |
parent | bfc0f483c626a1af1f18f8d7a9748c901cb48f2f (diff) | |
parent | fa4b2d25cb32caba2ccd90603a6fc02d84e437d0 (diff) |
Merge branch 'blender-v2.93-release'
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c b/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c index a6e2ba49fe2..611a9cba000 100644 --- a/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c +++ b/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c @@ -731,15 +731,6 @@ wmGizmo *wm_gizmomap_highlight_find(wmGizmoMap *gzmap, BLI_buffer_declare_static(wmGizmo *, visible_3d_gizmos, BLI_BUFFER_NOP, 128); bool do_step[WM_GIZMOMAP_DRAWSTEP_MAX]; - int mval[2] = {UNPACK2(event->mval)}; - - /* Ensure for drag events we use the location where the user clicked. - * Without this click-dragging on a gizmo can accidentally act on the wrong gizmo. */ - if (WM_event_is_mouse_drag(event)) { - mval[0] += event->x - event->prevclickx; - mval[1] += event->y - event->prevclicky; - } - for (int i = 0; i < ARRAY_SIZE(do_step); i++) { do_step[i] = WM_gizmo_context_check_drawstep(C, i); } @@ -775,7 +766,7 @@ wmGizmo *wm_gizmomap_highlight_find(wmGizmoMap *gzmap, } else if (step == WM_GIZMOMAP_DRAWSTEP_2D) { if ((gz = wm_gizmogroup_find_intersected_gizmo( - wm, gzgroup, C, event_modifier, mval, r_part))) { + wm, gzgroup, C, event_modifier, event->mval, r_part))) { break; } } @@ -787,7 +778,7 @@ wmGizmo *wm_gizmomap_highlight_find(wmGizmoMap *gzmap, /* 2D gizmos get priority. */ if (gz == NULL) { gz = gizmo_find_intersected_3d( - C, mval, visible_3d_gizmos.data, visible_3d_gizmos.count, r_part); + C, event->mval, visible_3d_gizmos.data, visible_3d_gizmos.count, r_part); } } BLI_buffer_free(&visible_3d_gizmos); |