From ff39d7b4bf3ed05d87a8f7005dadb8db564f34c5 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 27 Jun 2013 05:19:25 +0000 Subject: [PATCH] fix for incorrect selection when running MESH_OT_loop_to_region, running wire-frame operator directly after would crash. --- source/blender/bmesh/operators/bmo_wireframe.c | 1 + source/blender/editors/mesh/editmesh_select.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/source/blender/bmesh/operators/bmo_wireframe.c b/source/blender/bmesh/operators/bmo_wireframe.c index ba8c5432a68..fc2e1bbaf3e 100644 --- a/source/blender/bmesh/operators/bmo_wireframe.c +++ b/source/blender/bmesh/operators/bmo_wireframe.c @@ -80,6 +80,7 @@ static void bm_vert_boundary_tangent(BMVert *v, float r_no[3], float r_no_face[3 } if (e_a && e_b) { + /* note, with an incorrectly flushed selection this can crash */ l_a = bm_edge_tag_faceloop(e_a); l_b = bm_edge_tag_faceloop(e_b); diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c index 89981bce12d..468bbb8a5c5 100644 --- a/source/blender/editors/mesh/editmesh_select.c +++ b/source/blender/editors/mesh/editmesh_select.c @@ -3188,6 +3188,8 @@ static int edbm_loop_to_region_exec(bContext *C, wmOperator *op) } } + EDBM_selectmode_flush(em); + WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data); return OPERATOR_FINISHED; }