Fix bug selecting verts in mixed edge/vert mode
authorCampbell Barton <ideasman42@gmail.com>
Fri, 21 Dec 2018 07:16:41 +0000 (18:16 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 21 Dec 2018 07:17:59 +0000 (18:17 +1100)
Own regression from 2.7x when adding multi-object select support.

source/blender/editors/mesh/editmesh_select.c

index fdd8a124652874d73725451761a4420051aa6e57..e522c8849c71d2c102d0f754bd634a84c9c89769 100644 (file)
@@ -984,7 +984,7 @@ static bool unified_findnearest(
                        ED_view3d_backbuf_validate(vc);
                        BMFace *efa_zbuf = NULL;
                        BMFace *efa_test = EDBM_face_find_nearest_ex(vc, &dist, dist_center_p, true, use_cycle, &efa_zbuf);
-                       if (hit.f.ele && dist_center_p) {
+                       if (efa_test && dist_center_p) {
                                dist = min_ff(dist_margin, dist_center);
                        }
                        if (efa_test) {
@@ -1009,7 +1009,7 @@ static bool unified_findnearest(
                        ED_view3d_backbuf_validate(vc);
                        BMEdge *eed_zbuf = NULL;
                        BMEdge *eed_test = EDBM_edge_find_nearest_ex(vc, &dist, dist_center_p, true, use_cycle, &eed_zbuf);
-                       if (hit.e.ele && dist_center_p) {
+                       if (eed_test && dist_center_p) {
                                dist = min_ff(dist_margin, dist_center);
                        }
                        if (eed_test) {