From 73b9e86b49907fcdb04f019ebf6644e8f70c04a1 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 8 Nov 2019 19:16:27 +1100 Subject: [PATCH] EditMesh: avoid undo push on face creation if no action is made --- source/blender/editors/mesh/editmesh_tools.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index a1232347516..eb50babf395 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -930,7 +930,7 @@ static void edbm_add_edge_face_exec__tricky_finalize_sel(BMesh *bm, BMElem *ele_ static int edbm_add_edge_face_exec(bContext *C, wmOperator *op) { /* when this is used to dissolve we could avoid this, but checking isnt too slow */ - + bool changed_multi = false; ViewLayer *view_layer = CTX_data_view_layer(C); uint objects_len = 0; Object **objects = BKE_view_layer_array_from_objects_in_edit_mode_unique_data( @@ -1005,9 +1005,14 @@ static int edbm_add_edge_face_exec(bContext *C, wmOperator *op) } EDBM_update_generic(em, true, true); + changed_multi = true; } MEM_freeN(objects); + if (!changed_multi) { + return OPERATOR_CANCELLED; + } + return OPERATOR_FINISHED; }