[Bf-blender-cvs] [7b6c7f07d5e] greasepencil-object: Fix cursor error when using eraser
Antonio Vazquez
noreply at git.blender.org
Thu Jun 8 13:42:50 CEST 2017
Commit: 7b6c7f07d5e6acf358ebbaacff553154ad3dec98
Author: Antonio Vazquez
Date: Thu Jun 8 12:15:20 2017 +0200
Branches: greasepencil-object
https://developer.blender.org/rB7b6c7f07d5e6acf358ebbaacff553154ad3dec98
Fix cursor error when using eraser
The cursor did not return to paint after using eraser
===================================================================
M source/blender/editors/gpencil/gpencil_paint.c
===================================================================
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index e50cbb99761..b36ada24577 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -1882,6 +1882,12 @@ static void gpencil_draw_exit(bContext *C, wmOperator *op)
if (p->sa->spacetype != SPACE_VIEW3D) {
WM_cursor_modal_restore(CTX_wm_window(C));
}
+ else {
+ /* or restore paint if 3D view */
+ if ((p) && (p->paintmode == GP_PAINTMODE_ERASER)) {
+ WM_cursor_modal_set(p->win, BC_PAINTBRUSHCURSOR);
+ }
+ }
/* don't assume that operator data exists at all */
if (p) {
/* check size of buffer before cleanup, to determine if anything happened here */
More information about the Bf-blender-cvs
mailing list