diff options
-rw-r--r-- | source/blender/editors/mesh/editmesh_select.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c index 36019443eb8..c8d17e76344 100644 --- a/source/blender/editors/mesh/editmesh_select.c +++ b/source/blender/editors/mesh/editmesh_select.c @@ -1168,9 +1168,8 @@ static bool unified_findnearest(ViewContext *vc, } hit = {{NULL}}; /* no afterqueue (yet), so we check it now, otherwise the em_xxxofs indices are bad */ - short selectmode = vc->scene->toolsettings->selectmode; - if ((dist > 0.0f) && (selectmode & SCE_SELECT_FACE)) { + if ((dist > 0.0f) && (em->selectmode & SCE_SELECT_FACE)) { float dist_center = 0.0f; float *dist_center_p = (em->selectmode & (SCE_SELECT_EDGE | SCE_SELECT_VERTEX)) ? &dist_center : @@ -1194,7 +1193,7 @@ static bool unified_findnearest(ViewContext *vc, } } - if ((dist > 0.0f) && (selectmode & SCE_SELECT_EDGE)) { + if ((dist > 0.0f) && (em->selectmode & SCE_SELECT_EDGE)) { float dist_center = 0.0f; float *dist_center_p = (em->selectmode & SCE_SELECT_VERTEX) ? &dist_center : NULL; @@ -1216,7 +1215,7 @@ static bool unified_findnearest(ViewContext *vc, } } - if ((dist > 0.0f) && (selectmode & SCE_SELECT_VERTEX)) { + if ((dist > 0.0f) && (em->selectmode & SCE_SELECT_VERTEX)) { uint base_index = 0; BMVert *eve_test = EDBM_vert_find_nearest_ex( vc, &dist, true, use_cycle, bases, bases_len, &base_index); |