diff options
author | Campbell Barton <campbell@blender.org> | 2022-02-24 07:19:15 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-02-24 07:24:09 +0300 |
commit | f80f7afbf03af08a0255b353e1e775d51174763e (patch) | |
tree | fcfe8a14d609cc4dec705c82a49186898d9af799 /source/blender | |
parent | ba274d20b4f19833e6413fdc7f1bc3a663cc2f8c (diff) |
Fix 2D view NDOF panning requiring both axes to be non-zero
Possible fix for T86592.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/interface/view2d_ops.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c index 0d3c427bf39..62103e2cd63 100644 --- a/source/blender/editors/interface/view2d_ops.c +++ b/source/blender/editors/interface/view2d_ops.c @@ -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) { |