diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2021-11-02 06:41:41 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2021-11-02 06:43:48 +0300 |
commit | 24310441ddc85ecc8dc857ccc75b508db59bd844 (patch) | |
tree | 9a87e2ff0750f171d5ffecdbd317af83d452f313 /source/blender/editors/space_view3d/view3d_cursor_snap.c | |
parent | 348d7c35a9f9ffb56e716430100a3d167884889c (diff) |
Fix snap cursor still active even when gizmo is not available
The snap cursor continued to appear even when the workspace is changed for example.
So add the region to check in the cursor pool.
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_cursor_snap.c')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_cursor_snap.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/editors/space_view3d/view3d_cursor_snap.c b/source/blender/editors/space_view3d/view3d_cursor_snap.c index baf61befcba..479acb3cb1a 100644 --- a/source/blender/editors/space_view3d/view3d_cursor_snap.c +++ b/source/blender/editors/space_view3d/view3d_cursor_snap.c @@ -777,6 +777,13 @@ static bool v3d_cursor_snap_pool_fn(bContext *C) return false; }; + V3DSnapCursorState *state = ED_view3d_cursor_snap_state_get(); + if (state->region && (state->region != region)) { + /* Some gizmos are still available even when the region is not available. + * We need to disable the cursor in these cases. */ + return false; + } + return true; } |