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>2015-03-10 10:17:02 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-03-10 10:17:02 +0300
commitf1a0c2a4f025ce26aabab055ce04aecf34bf90ea (patch)
tree23a7220bb7c41b192815aab45817e3845cbd69c0 /source/blender
parentafa8a0ac19f28c103171c010929470a2a167c976 (diff)
Fix T43941: Grease pencil eraser outline vanishes
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/gpencil/gpencil_paint.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index 38a7ffaca86..c8774cb73a1 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -1942,18 +1942,15 @@ static int gpencil_draw_modal(bContext *C, wmOperator *op, const wmEvent *event)
*/
if (event->type == LEFTMOUSE) {
/* restore drawmode to default */
- // XXX: no need for this... this should just revert by itself
- if (p->paintmode == GP_PAINTMODE_ERASER)
- gpencil_draw_toggle_eraser_cursor(C, p, false);
-
p->paintmode = RNA_enum_get(op->ptr, "mode");
}
else if (event->type == RIGHTMOUSE) {
/* turn on eraser */
p->paintmode = GP_PAINTMODE_ERASER;
- gpencil_draw_toggle_eraser_cursor(C, p, true);
}
-
+
+ gpencil_draw_toggle_eraser_cursor(C, p, p->paintmode == GP_PAINTMODE_ERASER);
+
/* not painting, so start stroke (this should be mouse-button down) */
p = gpencil_stroke_begin(C, op);