diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2021-10-28 01:07:40 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2021-10-28 01:07:40 +0300 |
commit | a2f0f982710d9606248bdd4b83033c57db143cf9 (patch) | |
tree | 56eb50cbfc77c3369d07ff42b363156104c632f7 /source/blender | |
parent | 7d2c75905424222fbf6a118acfbd9b115dbc1976 (diff) | |
parent | b838eaf2b960af5877d77eed1ef1ad4ede1071f0 (diff) |
Merge branch 'blender-v3.0-release'
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/include/ED_view3d.h | 1 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_cursor_snap.c | 14 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_init_exit.c | 1 |
3 files changed, 5 insertions, 11 deletions
diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h index a0c733b2ebf..6d20044d8cf 100644 --- a/source/blender/editors/include/ED_view3d.h +++ b/source/blender/editors/include/ED_view3d.h @@ -304,7 +304,6 @@ void ED_view3d_cursor_snap_draw_util(struct RegionView3D *rv3d, const uchar color_line[4], const uchar color_point[4], const short snap_elem_type); -void ED_view3d_cursor_snap_exit(void); /* view3d_iterators.c */ diff --git a/source/blender/editors/space_view3d/view3d_cursor_snap.c b/source/blender/editors/space_view3d/view3d_cursor_snap.c index 937ac98acb8..e8f1e011364 100644 --- a/source/blender/editors/space_view3d/view3d_cursor_snap.c +++ b/source/blender/editors/space_view3d/view3d_cursor_snap.c @@ -883,16 +883,16 @@ static void v3d_cursor_snap_activate(void) static void v3d_cursor_snap_free(void) { SnapCursorDataIntern *data_intern = &g_data_intern; - if (data_intern->handle && G_MAIN->wm.first) { - WM_paint_cursor_end(data_intern->handle); + if (data_intern->handle) { + if (G_MAIN->wm.first) { + WM_paint_cursor_end(data_intern->handle); + } data_intern->handle = NULL; } if (data_intern->snap_context_v3d) { ED_transform_snap_object_context_destroy(data_intern->snap_context_v3d); data_intern->snap_context_v3d = NULL; } - - BLI_freelistN(&data_intern->state_intern); } void ED_view3d_cursor_snap_state_default_set(V3DSnapCursorState *state) @@ -923,6 +923,7 @@ void ED_view3d_cursor_snap_deactive(V3DSnapCursorState *state) SnapStateIntern *state_intern = STATE_INTERN_GET(state); BLI_remlink(&data_intern->state_intern, state_intern); + MEM_freeN(state_intern); if (BLI_listbase_is_empty(&data_intern->state_intern)) { v3d_cursor_snap_free(); } @@ -973,8 +974,3 @@ struct SnapObjectContext *ED_view3d_cursor_snap_context_ensure(Scene *scene) v3d_cursor_snap_context_ensure(scene); return data_intern->snap_context_v3d; } - -void ED_view3d_cursor_snap_exit(void) -{ - v3d_cursor_snap_free(); -} diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c index d0693d37ef4..c382af03c4a 100644 --- a/source/blender/windowmanager/intern/wm_init_exit.c +++ b/source/blender/windowmanager/intern/wm_init_exit.c @@ -548,7 +548,6 @@ void WM_exit_ex(bContext *C, const bool do_python) ED_preview_free_dbase(); /* frees a Main dbase, before BKE_blender_free! */ ED_assetlist_storage_exit(); - ED_view3d_cursor_snap_exit(); if (wm) { /* Before BKE_blender_free! - since the ListBases get freed there. */ |