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:
authorCampbell Barton <ideasman42@gmail.com>2011-05-20 11:40:05 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-05-20 11:40:05 +0400
commit9f766c71b0a98801600c775dfc46faee84ddf49e (patch)
treee8d933e20df512eb836062e0f8cf9191f32c1141 /source/blender/editors/transform/transform_input.c
parent2338765726a5aa6b8870d573d685218720864583 (diff)
use event->mval rather then subtracting ar->winrct.x / y from event->x / y
Diffstat (limited to 'source/blender/editors/transform/transform_input.c')
-rw-r--r--source/blender/editors/transform/transform_input.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/editors/transform/transform_input.c b/source/blender/editors/transform/transform_input.c
index 7a16e25302c..b3608305a7a 100644
--- a/source/blender/editors/transform/transform_input.c
+++ b/source/blender/editors/transform/transform_input.c
@@ -372,7 +372,7 @@ void setInputPostFct(MouseInput *mi, void (*post)(struct TransInfo *, float [3])
mi->post = post;
}
-void applyMouseInput(TransInfo *t, MouseInput *mi, int mval[2], float output[3])
+void applyMouseInput(TransInfo *t, MouseInput *mi, const int mval[2], float output[3])
{
if (mi->apply != NULL)
{
@@ -398,8 +398,7 @@ int handleMouseInput(TransInfo *t, MouseInput *mi, wmEvent *event)
t->modifiers |= MOD_PRECISION;
/* shift is modifier for higher precision transform
* store the mouse position where the normal movement ended */
- mi->precision_mval[0] = event->x - t->ar->winrct.xmin;
- mi->precision_mval[1] = event->y - t->ar->winrct.ymin;
+ VECCOPY2D(mi->precision_mval, event->mval);
mi->precision = 1;
}
else