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>2017-10-16 06:31:19 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-10-16 06:31:19 +0300
commit14af3e485f1207e8f4ddb6991b22e1ba2f937c45 (patch)
tree157e34ab31912db5db2cd08f5c216b5971fb3d23 /source/blender/windowmanager/intern/wm_gesture.c
parenta1bb2ae0d7be4031c9dc1abb805b68d2338c96ea (diff)
parent137586a13c758d95472c3a3eabfc7dd4b22b7502 (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/windowmanager/intern/wm_gesture.c')
-rw-r--r--source/blender/windowmanager/intern/wm_gesture.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/windowmanager/intern/wm_gesture.c b/source/blender/windowmanager/intern/wm_gesture.c
index 77030fac5ea..7f1ca929fd6 100644
--- a/source/blender/windowmanager/intern/wm_gesture.c
+++ b/source/blender/windowmanager/intern/wm_gesture.c
@@ -97,11 +97,11 @@ wmGesture *WM_gesture_new(bContext *C, const 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_MIN_POINTS, "lasso points");
+ gesture->points_alloc = 1024;
+ gesture->customdata = lasso = MEM_mallocN(sizeof(short[2]) * gesture->points_alloc, "lasso points");
lasso[0] = event->x - sx;
lasso[1] = event->y - sy;
gesture->points = 1;
- gesture->size = WM_LASSO_MIN_POINTS;
}
return gesture;
@@ -437,10 +437,12 @@ void wm_gesture_draw(wmWindow *win)
else if (gt->type == WM_GESTURE_CIRCLE)
wm_gesture_draw_circle(gt);
else if (gt->type == WM_GESTURE_CROSS_RECT) {
- if (gt->mode == 1)
+ if (gt->is_active) {
wm_gesture_draw_rect(gt);
- else
+ }
+ else {
wm_gesture_draw_cross(win, gt);
+ }
}
else if (gt->type == WM_GESTURE_LINES)
wm_gesture_draw_lasso(win, gt, false);