Fix 2D view NDOF panning requiring both axes to be non-zero

Possible fix for T86592.
This commit is contained in:
Campbell Barton 2022-02-24 15:19:15 +11:00
parent ba274d20b4
commit f80f7afbf0
Notes: blender-bot 2023-02-14 07:25:51 +01:00
Referenced by issue #86592, NDOF or 3D mouse not working properly in Compositor
1 changed files with 1 additions and 1 deletions

View File

@ -1465,7 +1465,7 @@ static int view2d_ndof_invoke(bContext *C, wmOperator *op, const wmEvent *event)
/* tune these until it feels right */
const float zoom_sensitivity = 0.5f;
const float speed = 10.0f; /* match view3d ortho */
const bool has_translate = (ndof->tvec[0] && ndof->tvec[1]) && view_pan_poll(C);
const bool has_translate = !is_zero_v2(ndof->tvec) && view_pan_poll(C);
const bool has_zoom = (ndof->tvec[2] != 0.0f) && view_zoom_poll(C);
if (has_translate) {