diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-04-19 10:08:46 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-04-19 10:10:10 +0300 |
commit | 95a45e308d425f69c0594af92e6e0666b3fd028a (patch) | |
tree | 6a8b897537552866ff94e1f75f5cb59326adef29 /source | |
parent | 81673f5ab7f4d404b9b263bac88e8b271b0ccdac (diff) |
BMesh: Add back call to finish operator
Was commented in multi-edit patch, finish is needed to free memory.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/mesh/editmesh_tools.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index e4581253286..94365be6b2e 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -4175,11 +4175,18 @@ static int edbm_quads_convert_to_tris_exec(bContext *C, wmOperator *op) Object *obedit = objects[ob_index]; BMEditMesh *em = BKE_editmesh_from_object(obedit); + if (em->bm->totfacesel == 0) { + continue; + } + BMOperator bmop; BMOIter oiter; BMFace *f; - EDBM_op_init(em, &bmop, op, "triangulate faces=%hf quad_method=%i ngon_method=%i", BM_ELEM_SELECT, quad_method, ngon_method); + EDBM_op_init( + em, &bmop, op, + "triangulate faces=%hf quad_method=%i ngon_method=%i", + BM_ELEM_SELECT, quad_method, ngon_method); BMO_op_exec(em->bm, &bmop); /* select the output */ @@ -4192,12 +4199,9 @@ static int edbm_quads_convert_to_tris_exec(bContext *C, wmOperator *op) EDBM_selectmode_flush(em); - // XXX, TODO -#if 0 if (!EDBM_op_finish(em, &bmop, op, true)) { - return OPERATOR_CANCELLED; + continue; } -#endif EDBM_update_generic(em, true, true); } |