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.
This commit is contained in:
Germano Cavalcante 2021-12-05 22:39:04 -03:00 committed by Philipp Oeser
parent 256c1b82f6
commit 4c8b93c5c2
Notes: blender-bot 2023-02-14 08:35:51 +01:00
Referenced by issue #93732, Snap Cursor not working after changing Add Object tool settings
Referenced by issue #93479, 3.0 Potential candidates for corrective releases
1 changed files with 8 additions and 0 deletions

View File

@ -922,6 +922,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)