Commit: 3aab4f8902b97814598a390d31039ae87f7d29ac
Author: Campbell Barton
Date:   Fri Nov 8 19:16:27 2019 +1100
Branches: temp-lanpr-cleanup2
https://developer.blender.org/rB3aab4f8902b97814598a390d31039ae87f7d29ac

EditMesh: avoid undo push on face creation if no action is made

===================================================================

M       source/blender/editors/mesh/editmesh_tools.c

===================================================================

diff --git a/source/blender/editors/mesh/editmesh_tools.c 
b/source/blender/editors/mesh/editmesh_tools.c
index c98c1077a84..fd7182428ea 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;
 }

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to