diff options
author | Martin Poirier <theeth@yahoo.com> | 2010-01-10 23:16:56 +0300 |
---|---|---|
committer | Martin Poirier <theeth@yahoo.com> | 2010-01-10 23:16:56 +0300 |
commit | 6a15ac70b6558873dc15aa2172024477362fc33f (patch) | |
tree | f18ea53d09cd6521da6ab2d87cf032e87da61af3 /source/blender/windowmanager/intern/wm_gesture.c | |
parent | b36a05bb7e794335e3415594c41d3986cdc815e8 (diff) |
[#20581] Lasso tool ends unexpectedly
Don't limit lasso to 1024 points, just realloc array with increased size when current limit is reached.
Also silence two stupid warnings.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_gesture.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_gesture.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/windowmanager/intern/wm_gesture.c b/source/blender/windowmanager/intern/wm_gesture.c index a57421560a6..80d6869067a 100644 --- a/source/blender/windowmanager/intern/wm_gesture.c +++ b/source/blender/windowmanager/intern/wm_gesture.c @@ -91,10 +91,11 @@ wmGesture *WM_gesture_new(bContext *C, wmEvent *event, int type) } else if (ELEM(type, WM_GESTURE_LINES, WM_GESTURE_LASSO)) { short *lasso; - gesture->customdata= lasso= MEM_callocN(2*sizeof(short)*WM_LASSO_MAX_POINTS, "lasso points"); + gesture->customdata= lasso= MEM_callocN(2*sizeof(short)*WM_LASSO_MIN_POINTS, "lasso points"); lasso[0] = event->x - sx; lasso[1] = event->y - sy; gesture->points= 1; + gesture->size = WM_LASSO_MIN_POINTS; } return gesture; |