diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-10-25 08:06:47 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-10-25 08:06:47 +0300 |
commit | 6d49b623e2efce59b58bb1295024ab8ac492370a (patch) | |
tree | ebe29d04b2e9730dfb4f7cd733e63e2676794dfc /source/blender/editors/gpencil | |
parent | 46587b3ccb0ec842500ce2c3f2359b78550aad0f (diff) |
WM: space, region type filtering for paint cursor
Avoids calling poll on mouse-move for unrelated space/region types.
Diffstat (limited to 'source/blender/editors/gpencil')
-rw-r--r-- | source/blender/editors/gpencil/annotate_paint.c | 1 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_paint.c | 7 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_utils.c | 1 |
3 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/editors/gpencil/annotate_paint.c b/source/blender/editors/gpencil/annotate_paint.c index 31c66ac8d55..57be09d807c 100644 --- a/source/blender/editors/gpencil/annotate_paint.c +++ b/source/blender/editors/gpencil/annotate_paint.c @@ -1458,6 +1458,7 @@ static void gpencil_draw_toggle_eraser_cursor(bContext *C, tGPsdata *p, short en /* enable cursor */ p->erasercursor = WM_paint_cursor_activate( CTX_wm_manager(C), + SPACE_TYPE_ANY, RGN_TYPE_ANY, NULL, /* XXX */ gpencil_draw_eraser, p); } diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index 711f77c5890..4e45db6aa76 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -2209,9 +2209,10 @@ static void gpencil_draw_toggle_eraser_cursor(bContext *C, tGPsdata *p, short en ED_gpencil_toggle_brush_cursor(p->C, false, NULL); /* enable cursor */ p->erasercursor = WM_paint_cursor_activate( - CTX_wm_manager(C), - NULL, /* XXX */ - gpencil_draw_eraser, p); + CTX_wm_manager(C), + SPACE_TYPE_ANY, RGN_TYPE_ANY, + NULL, /* XXX */ + gpencil_draw_eraser, p); } } diff --git a/source/blender/editors/gpencil/gpencil_utils.c b/source/blender/editors/gpencil/gpencil_utils.c index 77a838d2f22..fd7ce2d4139 100644 --- a/source/blender/editors/gpencil/gpencil_utils.c +++ b/source/blender/editors/gpencil/gpencil_utils.c @@ -1684,6 +1684,7 @@ void ED_gpencil_toggle_brush_cursor(bContext *C, bool enable, void *customdata) /* enable cursor */ gset->paintcursor = WM_paint_cursor_activate( CTX_wm_manager(C), + SPACE_TYPE_ANY, RGN_TYPE_ANY, NULL, gp_brush_drawcursor, (lastpost) ? customdata : NULL); |