From dac81ad71b88d1ffa2ea2a4a22ede06dc4b56adb Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 5 Jul 2021 23:37:11 +1000 Subject: EditMesh: extract restore logic out of EDBM_redo_state_free Split mesh restore logic into a new function: `EDBM_redo_state_restore_and_free`. --- source/blender/editors/mesh/editmesh_inset.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/editors/mesh/editmesh_inset.c') diff --git a/source/blender/editors/mesh/editmesh_inset.c b/source/blender/editors/mesh/editmesh_inset.c index 1c27ab00715..18f51ae9df2 100644 --- a/source/blender/editors/mesh/editmesh_inset.c +++ b/source/blender/editors/mesh/editmesh_inset.c @@ -209,7 +209,7 @@ static void edbm_inset_exit(bContext *C, wmOperator *op) View3D *v3d = CTX_wm_view3d(C); ARegion *region = CTX_wm_region(C); for (uint ob_index = 0; ob_index < opdata->ob_store_len; ob_index++) { - EDBM_redo_state_free(&opdata->ob_store[ob_index].mesh_backup, NULL, false); + EDBM_redo_state_free(&opdata->ob_store[ob_index].mesh_backup); } ED_region_draw_cb_exit(region->type, opdata->draw_handle_pixel); if (v3d) { @@ -235,7 +235,7 @@ static void edbm_inset_cancel(bContext *C, wmOperator *op) for (uint ob_index = 0; ob_index < opdata->ob_store_len; ob_index++) { Object *obedit = opdata->ob_store[ob_index].ob; BMEditMesh *em = BKE_editmesh_from_object(obedit); - EDBM_redo_state_free(&opdata->ob_store[ob_index].mesh_backup, em, true); + EDBM_redo_state_restore_and_free(&opdata->ob_store[ob_index].mesh_backup, em, true); EDBM_update(obedit->data, &(const struct EDBMUpdate_Params){ .calc_looptri = false, @@ -276,7 +276,7 @@ static bool edbm_inset_calc(wmOperator *op) BMEditMesh *em = BKE_editmesh_from_object(obedit); if (opdata->is_modal) { - EDBM_redo_state_restore(opdata->ob_store[ob_index].mesh_backup, em, false); + EDBM_redo_state_restore(&opdata->ob_store[ob_index].mesh_backup, em, false); } if (use_individual) { -- cgit v1.2.3