Commit: 9425628c84d091591229d54fbb2bc3b36350d94e
Author: Yevgeny Makarov
Date:   Wed Jan 20 22:11:56 2021 +1100
Branches: master
https://developer.blender.org/rB9425628c84d091591229d54fbb2bc3b36350d94e

Fix T65837: Zoom Axis is not working in the Node Editor

It was already fixed for the mouse in
bcda8cc89b88c999ff64edcc19973d6289bcbf2a, T65837
now the same logic is applied for the track-pad.

Ref D8685

===================================================================

M       source/blender/editors/interface/view2d_ops.c

===================================================================

diff --git a/source/blender/editors/interface/view2d_ops.c 
b/source/blender/editors/interface/view2d_ops.c
index 222f03ee1d8..8ce22387eb2 100644
--- a/source/blender/editors/interface/view2d_ops.c
+++ b/source/blender/editors/interface/view2d_ops.c
@@ -1242,6 +1242,18 @@ static int view_zoomdrag_invoke(bContext *C, wmOperator 
*op, const wmEvent *even
     }
     float dy = fac * BLI_rctf_size_y(&v2d->cur) / 10.0f;
 
+    /* Only respect user setting zoom axis if the view does not have any zoom 
restrictions
+     * any will be scaled uniformly. */
+    if (((v2d->keepzoom & (V2D_LOCKZOOM_X | V2D_LOCKZOOM_Y)) == 0) &&
+        (v2d->keepzoom & V2D_KEEPASPECT)) {
+      if (U.uiflag & USER_ZOOM_HORIZ) {
+        dy = 0;
+      }
+      else {
+        dx = 0;
+      }
+    }
+
     /* support trackpad zoom to always zoom entirely - the v2d code uses 
portrait or
      * landscape exceptions */
     if (v2d->keepzoom & V2D_KEEPASPECT) {

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to