Commit: a0d88989b9b366332a0cb61a1b8fe5abcd03a2eb
Author: Antonio Vazquez
Date: Sat Jun 24 12:10:10 2017 +0200
Branches: greasepencil-object
https://developer.blender.org/rBa0d88989b9b366332a0cb61a1b8fe5abcd03a2eb
Cleanup: Add double cursor check inside function
===================================================================
M source/blender/editors/gpencil/gpencil_utils.c
M source/blender/editors/space_view3d/view3d_select.c
===================================================================
diff --git a/source/blender/editors/gpencil/gpencil_utils.c
b/source/blender/editors/gpencil/gpencil_utils.c
index 59c7e9274c7..6bebfa016d8 100644
--- a/source/blender/editors/gpencil/gpencil_utils.c
+++ b/source/blender/editors/gpencil/gpencil_utils.c
@@ -1335,6 +1335,12 @@ void ED_gpencil_toggle_brush_cursor(bContext *C, bool
enable)
gset->paintcursor = NULL;
}
else if (enable) {
+ /* in some situations cursor could be duplicated, so it is
better disable first if exist */
+ if (gset->paintcursor) {
+ /* clear cursor */
+ WM_paint_cursor_end(CTX_wm_manager(C),
gset->paintcursor);
+ gset->paintcursor = NULL;
+ }
/* enable cursor */
gset->paintcursor = WM_paint_cursor_activate(CTX_wm_manager(C),
NULL,
diff --git a/source/blender/editors/space_view3d/view3d_select.c
b/source/blender/editors/space_view3d/view3d_select.c
index 69068fbb0f7..945742b1c60 100644
--- a/source/blender/editors/space_view3d/view3d_select.c
+++ b/source/blender/editors/space_view3d/view3d_select.c
@@ -1609,8 +1609,6 @@ static bool ed_object_select_pick(
}
else if (basact->object->mode ==
OB_MODE_GPENCIL_SCULPT) {
WM_cursor_modal_set(CTX_wm_window(C),
BC_CROSSCURSOR);
- /* first disable to avoid duplicate
cursors */
- ED_gpencil_toggle_brush_cursor(C,
false);
ED_gpencil_toggle_brush_cursor(C, true);
}
else {
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs