Merge branch 'blender-v2.93-release'

This commit is contained in:
Campbell Barton 2021-04-17 00:21:30 +10:00
commit c7a8bcfa37
1 changed files with 2 additions and 11 deletions

View File

@ -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);