From 76cb6829e50b53211858b514f290881872a43d45 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 10 Aug 2013 23:22:35 +0000 Subject: edge-split now leaves split edges selected --- source/blender/editors/mesh/editmesh_tools.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index 629618fd353..4610bb89ae4 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -852,22 +852,23 @@ static int edbm_edge_split_exec(bContext *C, wmOperator *op) { Object *obedit = CTX_data_edit_object(C); BMEditMesh *em = BKE_editmesh_from_object(obedit); - BMesh *bm = em->bm; - BMOperator bmop; - int len = 0; - - if (!EDBM_op_init(em, &bmop, op, "split_edges edges=%he", BM_ELEM_SELECT)) { - return OPERATOR_CANCELLED; - } - BMO_op_exec(bm, &bmop); - len = BMO_slot_get(bmop.slots_out, "edges.out")->len; - if (!EDBM_op_finish(em, &bmop, op, true)) { + + if (!EDBM_op_call_and_selectf( + em, op, + "edges.out", false, + "split_edges edges=%he", + BM_ELEM_SELECT)) + { return OPERATOR_CANCELLED; } + if (em->selectmode == SCE_SELECT_FACE) { + EDBM_select_flush(em); + } + EDBM_update_generic(em, true, true); - return len ? OPERATOR_FINISHED : OPERATOR_CANCELLED; + return OPERATOR_FINISHED; } void MESH_OT_edge_split(wmOperatorType *ot) -- cgit v1.2.3