Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2013-01-06 15:16:49 +0400
committerTon Roosendaal <ton@blender.org>2013-01-06 15:16:49 +0400
commit16ca65e4a91bf49b77dc27d79779a35ed749bbf8 (patch)
treee1a6731bbabd50ec3fb19c7b5311977155a37ab1 /source/blender/editors/interface/view2d_ops.c
parent27170d3e381adf514b01b4810665b870b030f882 (diff)
Solving nasty annoyance:
Trackpad zoom (swipe + CTRL) direction was inverted compared to MMB-drag or scrollwheel usage. In the 3D viewport it was OK, in all others not. Now the same physical gesture maps identical to zooming everywhere. Or to recap (with blender factory settings) Zooming in: - MMB-drag, move mouse towards screen - Scroll wheel, move finger towards screen - Magic Mouse, move finger towards screen - Trackpad 2-finger swipe: move fingers toward screen. To make this extra confusing: this is only consistent if you set your system to inperpret trackpad swipes as "inverted" (pan view left = swipe to right). This is a typical default, although Apple wants you to call this "Unnatural" :) Next commit will be testing on laptop if all pinch gestures zoom consistent. And following to that, a sensible user preference to map trackpad use for Blender yourself, to invert system defaults again. :) Blame and thanks goes to Sebastian Koenig, for his perseverance on getting this solved :)
Diffstat (limited to 'source/blender/editors/interface/view2d_ops.c')
-rw-r--r--source/blender/editors/interface/view2d_ops.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c
index cc473998340..9236800c16b 100644
--- a/source/blender/editors/interface/view2d_ops.c
+++ b/source/blender/editors/interface/view2d_ops.c
@@ -946,10 +946,10 @@ static int view_zoomdrag_invoke(bContext *C, wmOperator *op, wmEvent *event)
/* As we have only 1D information (magnify value), feed both axes
* with magnify information that is stored in x axis
*/
- fac = 0.01f * (event->x - event->prevx);
+ fac = 0.01f * (event->prevx - event->x);
dx = fac * BLI_rctf_size_x(&v2d->cur) / 10.0f;
if (event->type == MOUSEPAN)
- fac = 0.01f * (event->y - event->prevy);
+ fac = 0.01f * (event->prevy - event->y);
dy = fac * BLI_rctf_size_y(&v2d->cur) / 10.0f;
RNA_float_set(op->ptr, "deltax", dx);