[Bf-blender-cvs] [b0810f788c9] blender-v3.4-release: Fix T102650: Wrong cursor in greasepencil fill operation
Philipp Oeser
noreply at git.blender.org
Sun Nov 27 12:39:46 CET 2022
Commit: b0810f788c9edb326300320d482502c5f5ea28e2
Author: Philipp Oeser
Date: Wed Nov 23 14:05:53 2022 +0100
Branches: blender-v3.4-release
https://developer.blender.org/rBb0810f788c9edb326300320d482502c5f5ea28e2
Fix T102650: Wrong cursor in greasepencil fill operation
Caused by {rBbf8507414889}
Above comit set the wrong cursors (WM_CURSOR_DEFAULT).
When releasing MMB, we need to return to WM_CURSOR_PAINT_BRUSH.
When exiting, we need to return to WM_CURSOR_DOT (since this is the
default cursor for the tool, see `_defs_gpencil_paint` >
`generate_from_brushes`)
Maniphest Tasks: T102650
Differential Revision: https://developer.blender.org/D16591
===================================================================
M source/blender/editors/gpencil/gpencil_fill.c
===================================================================
diff --git a/source/blender/editors/gpencil/gpencil_fill.c b/source/blender/editors/gpencil/gpencil_fill.c
index 5c88e719b8c..508be27a12d 100644
--- a/source/blender/editors/gpencil/gpencil_fill.c
+++ b/source/blender/editors/gpencil/gpencil_fill.c
@@ -2461,7 +2461,7 @@ static void gpencil_fill_exit(bContext *C, wmOperator *op)
if (tgpf->draw_handle_3d) {
ED_region_draw_cb_exit(tgpf->region->type, tgpf->draw_handle_3d);
}
- WM_cursor_set(CTX_wm_window(C), WM_CURSOR_DEFAULT);
+ WM_cursor_set(CTX_wm_window(C), WM_CURSOR_DOT);
/* Remove depth buffer in cache. */
if (tgpf->depths) {
@@ -3011,7 +3011,7 @@ static int gpencil_fill_modal(bContext *C, wmOperator *op, const wmEvent *event)
tgpf->initial_length = len_v2(mlen);
}
if (event->val == KM_RELEASE) {
- WM_cursor_set(CTX_wm_window(C), WM_CURSOR_DEFAULT);
+ WM_cursor_modal_set(CTX_wm_window(C), WM_CURSOR_PAINT_BRUSH);
tgpf->mouse_init[0] = -1.0f;
tgpf->mouse_init[1] = -1.0f;
More information about the Bf-blender-cvs
mailing list