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
parent 3f7014ecc9
commit 3d8dea9ff9
Notes: blender-bot 2023-02-14 11:00:17 +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

@ -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)