From f507428d1189b48ba66a4a7826cd5db178b383a1 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 23 Jun 2010 18:47:56 +0000 Subject: Fix #22553: dragging number buttons would run update functions more often than necessary due to the more accurate mouse move events that are useful for sculpting and painting (at least on Linux/X11, not sure about other platforms). If the update function takes a while to run, this in turn causes more mouse move events to be accumulated, making things even slower, .. going into a spiral of slower and slower redraws. As a solution I've added a INBETWEEN_MOUSEMOVE event next to MOUSEMOVE. A MOUSEMOVE event is automatically changed to INBETWEEN_MOUSEMOVE when a MOUSEMOVE event is added after it. This new event type is only handled by painting/sculpting operators, everything else can happily ignore it. --- source/blender/editors/gpencil/gpencil_paint.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/editors/gpencil') diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index e06722c1af1..b52297a319c 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -1481,6 +1481,7 @@ static int gpencil_draw_modal (bContext *C, wmOperator *op, wmEvent *event) /* moving mouse - assumed that mouse button is down if in painting status */ case MOUSEMOVE: + case INBETWEEN_MOUSEMOVE: /* check if we're currently painting */ if (p->status == GP_STATUS_PAINTING) { /* handle drawing event */ -- cgit v1.2.3