Fix multitouch zoom erratic behavior in 3D view in vertical dolly mode
authorDamien Plisson <damien.plisson@yahoo.fr>
Sat, 29 May 2010 20:14:58 +0000 (20:14 +0000)
committerDamien Plisson <damien.plisson@yahoo.fr>
Sat, 29 May 2010 20:14:58 +0000 (20:14 +0000)
source/blender/editors/space_view3d/view3d_edit.c

index 3d039f07a65cbb15b1a6d01710319e113757dff0..5c2fe184d657327eedbb862bfa217dce41b1ceab 100644 (file)
@@ -1157,8 +1157,8 @@ static int viewzoom_invoke(bContext *C, wmOperator *op, wmEvent *event)
                        else {
                                
                                /* Set y move = x move as MOUSEZOOM uses only x axis to pass magnification value */
-                               vod->origy = vod->oldy = event->x;
-                               viewzoom_apply(vod, event->x, event->prevx, USER_ZOOM_DOLLY);
+                               vod->origy = vod->oldy = vod->origy + event->x - event->prevx;
+                               viewzoom_apply(vod, event->prevx, event->prevy, USER_ZOOM_DOLLY);
                        }
                        request_depth_update(CTX_wm_region_view3d(C));