diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-06-04 11:35:43 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-06-04 11:41:16 +0300 |
commit | 465a9f65de769d76cc950b674683a0903e36f31a (patch) | |
tree | 4fb27495cc0ca35e250b7af3d334ca5d5259d518 /source/blender/editors/gpencil/gpencil_utils.c | |
parent | 1a23b0be97934ef684e8362e6a888b54a70cef9b (diff) |
Cleanup: remove window manager argument for paint cursor API
This caused an additional argument when exiting object modes
and many other low level functions which don't need to access context.
This simplifies fixing T77073.
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_utils.c')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_utils.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/editors/gpencil/gpencil_utils.c b/source/blender/editors/gpencil/gpencil_utils.c index 3cab26eab44..1962eba5017 100644 --- a/source/blender/editors/gpencil/gpencil_utils.c +++ b/source/blender/editors/gpencil/gpencil_utils.c @@ -1871,19 +1871,18 @@ void ED_gpencil_toggle_brush_cursor(bContext *C, bool enable, void *customdata) if (gset->paintcursor && !enable) { /* clear cursor */ - WM_paint_cursor_end(CTX_wm_manager(C), gset->paintcursor); + WM_paint_cursor_end(gset->paintcursor); 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); + WM_paint_cursor_end(gset->paintcursor); gset->paintcursor = NULL; } /* enable cursor */ - gset->paintcursor = WM_paint_cursor_activate(CTX_wm_manager(C), - SPACE_TYPE_ANY, + gset->paintcursor = WM_paint_cursor_activate(SPACE_TYPE_ANY, RGN_TYPE_ANY, gp_brush_cursor_poll, gp_brush_cursor_draw, |