Cleanup: remove 'ED_view3d_cursor_snap_exit'
The callers of `ED_view3d_cursor_snap_active` that must handle the snapping of the cursor. Forcing release at the end can hide leaks.
This commit is contained in:
parent
b69195dd13
commit
b838eaf2b9
@ -304,7 +304,6 @@ void ED_view3d_cursor_snap_draw_util(struct RegionView3D *rv3d,
|
|||||||
const uchar color_line[4],
|
const uchar color_line[4],
|
||||||
const uchar color_point[4],
|
const uchar color_point[4],
|
||||||
const short snap_elem_type);
|
const short snap_elem_type);
|
||||||
void ED_view3d_cursor_snap_exit(void);
|
|
||||||
|
|
||||||
/* view3d_iterators.c */
|
/* view3d_iterators.c */
|
||||||
|
|
||||||
|
@ -883,16 +883,16 @@ static void v3d_cursor_snap_activate(void)
|
|||||||
static void v3d_cursor_snap_free(void)
|
static void v3d_cursor_snap_free(void)
|
||||||
{
|
{
|
||||||
SnapCursorDataIntern *data_intern = &g_data_intern;
|
SnapCursorDataIntern *data_intern = &g_data_intern;
|
||||||
if (data_intern->handle && G_MAIN->wm.first) {
|
if (data_intern->handle) {
|
||||||
WM_paint_cursor_end(data_intern->handle);
|
if (G_MAIN->wm.first) {
|
||||||
|
WM_paint_cursor_end(data_intern->handle);
|
||||||
|
}
|
||||||
data_intern->handle = NULL;
|
data_intern->handle = NULL;
|
||||||
}
|
}
|
||||||
if (data_intern->snap_context_v3d) {
|
if (data_intern->snap_context_v3d) {
|
||||||
ED_transform_snap_object_context_destroy(data_intern->snap_context_v3d);
|
ED_transform_snap_object_context_destroy(data_intern->snap_context_v3d);
|
||||||
data_intern->snap_context_v3d = NULL;
|
data_intern->snap_context_v3d = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
BLI_freelistN(&data_intern->state_intern);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ED_view3d_cursor_snap_state_default_set(V3DSnapCursorState *state)
|
void ED_view3d_cursor_snap_state_default_set(V3DSnapCursorState *state)
|
||||||
@ -974,8 +974,3 @@ struct SnapObjectContext *ED_view3d_cursor_snap_context_ensure(Scene *scene)
|
|||||||
v3d_cursor_snap_context_ensure(scene);
|
v3d_cursor_snap_context_ensure(scene);
|
||||||
return data_intern->snap_context_v3d;
|
return data_intern->snap_context_v3d;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ED_view3d_cursor_snap_exit(void)
|
|
||||||
{
|
|
||||||
v3d_cursor_snap_free();
|
|
||||||
}
|
|
||||||
|
@ -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_preview_free_dbase(); /* frees a Main dbase, before BKE_blender_free! */
|
||||||
ED_assetlist_storage_exit();
|
ED_assetlist_storage_exit();
|
||||||
ED_view3d_cursor_snap_exit();
|
|
||||||
|
|
||||||
if (wm) {
|
if (wm) {
|
||||||
/* Before BKE_blender_free! - since the ListBases get freed there. */
|
/* Before BKE_blender_free! - since the ListBases get freed there. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user