diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-05-12 20:47:36 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-05-12 20:47:36 +0400 |
commit | 5f5cdf9d00ddae944d3c50c2d0d7ecbed186d319 (patch) | |
tree | a1be0b3a5f75bc19bcd591617da4d77175ce3a50 /source/blender/editors/object/object_lattice.c | |
parent | 2ca7ded51d406df69e09bcafc834aff178d562a5 (diff) |
for bug [#27358] Transform bug when transform > 500
mouse coords would with cont. grab would wrap at short.
use mouse coords as int rather then short.
this problem still happens on linux because of XTranslateCoordinates
Diffstat (limited to 'source/blender/editors/object/object_lattice.c')
-rw-r--r-- | source/blender/editors/object/object_lattice.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/object/object_lattice.c b/source/blender/editors/object/object_lattice.c index 198c8cab7fa..14ce223db5e 100644 --- a/source/blender/editors/object/object_lattice.c +++ b/source/blender/editors/object/object_lattice.c @@ -305,7 +305,7 @@ void LATTICE_OT_make_regular(wmOperatorType *ot) static void findnearestLattvert__doClosest(void *userData, BPoint *bp, int x, int y) { - struct { BPoint *bp; short dist, select, mval[2]; } *data = userData; + struct { BPoint *bp; short dist, select; int mval[2]; } *data = userData; float temp = abs(data->mval[0]-x) + abs(data->mval[1]-y); if((bp->f1 & SELECT)==data->select) @@ -318,12 +318,12 @@ static void findnearestLattvert__doClosest(void *userData, BPoint *bp, int x, in } } -static BPoint *findnearestLattvert(ViewContext *vc, const short mval[2], int sel) +static BPoint *findnearestLattvert(ViewContext *vc, const int mval[2], int sel) { /* sel==1: selected gets a disadvantage */ /* in nurb and bezt or bp the nearest is written */ /* return 0 1 2: handlepunt */ - struct { BPoint *bp; short dist, select, mval[2]; } data = {NULL}; + struct { BPoint *bp; short dist, select; int mval[2]; } data = {NULL}; data.dist = 100; data.select = sel; @@ -336,7 +336,7 @@ static BPoint *findnearestLattvert(ViewContext *vc, const short mval[2], int sel return data.bp; } -int mouse_lattice(bContext *C, const short mval[2], int extend) +int mouse_lattice(bContext *C, const int mval[2], int extend) { ViewContext vc; BPoint *bp= NULL; |