Fix T64759: Pick select selects an incorrect face in edit mode.
authormano-wii <germano.costa@ig.com.br>
Fri, 17 May 2019 16:01:49 +0000 (13:01 -0300)
committermano-wii <germano.costa@ig.com.br>
Fri, 17 May 2019 16:02:57 +0000 (13:02 -0300)
Bug introduced in T64759.

source/blender/editors/mesh/editmesh_select.c

index f74614c..485d855 100644 (file)
@@ -269,7 +269,7 @@ BMElem *EDBM_select_id_bm_elem_get(struct EDBMSelectID_Context *sel_id_ctx,
   for (; base_index < sel_id_ctx->bases_len; base_index++) {
     struct EDBMBaseOffset *base_ofs = &sel_id_ctx->base_array_index_offsets[base_index];
     if (base_ofs->face > sel_id) {
-      elem_id = sel_id - prev_offs;
+      elem_id = sel_id - (prev_offs + 1);
       elem_type = BM_FACE;
       break;
     }