Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-11-08 11:16:27 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-11-08 11:16:27 +0300
commit73b9e86b49907fcdb04f019ebf6644e8f70c04a1 (patch)
tree9e7f555424772351f5090a14b5aa5a377615bbd9 /source/blender/editors/mesh
parente9d7fddeb442ec266fa2cb1eaf406ccfbe970ef2 (diff)
EditMesh: avoid undo push on face creation if no action is made
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c7
1 files changed, 6 insertions, 1 deletions
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;
}