diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2021-12-06 04:39:04 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2021-12-06 05:40:43 +0300 |
commit | 3d8dea9ff92d242174613063527f4add98688bac (patch) | |
tree | d00fd5c132a81b457c6d0206fb09496186deb57a /source/blender/editors/space_view3d/view3d_cursor_snap.c | |
parent | 3f7014ecc9d523997062eadd62888af5fc70a2b6 (diff) |
Fix T93732: Snap Cursor not working after changing Add Object settings
`g_data_intern.state_default.gzgrp_type` is a very specific member and
cannot be set to default.
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_cursor_snap.c')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_cursor_snap.c | 8 |
1 files changed, 8 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 47e7d452585..af3425111a3 100644 --- a/source/blender/editors/space_view3d/view3d_cursor_snap.c +++ b/source/blender/editors/space_view3d/view3d_cursor_snap.c @@ -919,6 +919,14 @@ static void v3d_cursor_snap_free(void) void ED_view3d_cursor_snap_state_default_set(V3DSnapCursorState *state) { g_data_intern.state_default = *state; + + /* These values are temporarily set by the tool. + * They are not convenient as default values. + * So reset to null. */ + g_data_intern.state_default.gzgrp_type = NULL; + g_data_intern.state_default.prevpoint = NULL; + g_data_intern.state_default.draw_plane = false; + g_data_intern.state_default.draw_box = false; } V3DSnapCursorState *ED_view3d_cursor_snap_active(void) |