Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_cursor_snap.c')
-rw-r--r--source/blender/editors/space_view3d/view3d_cursor_snap.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/source/blender/editors/space_view3d/view3d_cursor_snap.c b/source/blender/editors/space_view3d/view3d_cursor_snap.c
index 479acb3cb1a..fbdab71ec1d 100644
--- a/source/blender/editors/space_view3d/view3d_cursor_snap.c
+++ b/source/blender/editors/space_view3d/view3d_cursor_snap.c
@@ -778,10 +778,13 @@ static bool v3d_cursor_snap_pool_fn(bContext *C)
};
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;
+ if (state->gzgrp_type) {
+ /* Check the respective gizmo group is in the region. */
+ wmGizmoMap *gzmap = region->gizmo_map;
+ if (WM_gizmomap_group_find_ptr(gzmap, state->gzgrp_type) == NULL) {
+ /* Wrong viewport. */
+ return false;
+ }
}
return true;