Fix T53512: Vertices with index 0 were not being selected

Bug introduced on rB9f5bf197a0c3.
The offset for selection of vertices (`bm_vertoffs`) starts where the offset o edges ends (`bm_wireoffs`).
However, the `bm_wireoffs` depends on the offset of face selection (`bm_solidoffs`).

Before the commit that introduced the bug, the drawn of edges (in backbuff) was always computed along with the `bm_wireoffs`:
```
bm_wireoffs = bm_solidoffs + em->bm->totedge;
```

Now that the edges are not always drawn in backbuff, `bm_wireoffs` has to start from `bm_solidoffs`.
This commit is contained in:
Germano
2017-12-08 12:42:00 -02:00
parent f39a97fac5
commit e6838ecc26

View File

@@ -8433,8 +8433,9 @@ void draw_object_backbufsel(Scene *scene, View3D *v3d, RegionView3D *rv3d, Objec
bbs_mesh_solid_EM(em, scene, v3d, ob, dm, (ts->selectmode & SCE_SELECT_FACE) != 0);
if (ts->selectmode & SCE_SELECT_FACE)
bm_solidoffs = 1 + em->bm->totface;
else
else {
bm_solidoffs = 1;
}
ED_view3d_polygon_offset(rv3d, 1.0);
@@ -8443,6 +8444,10 @@ void draw_object_backbufsel(Scene *scene, View3D *v3d, RegionView3D *rv3d, Objec
bbs_mesh_wire(em, dm, bm_solidoffs);
bm_wireoffs = bm_solidoffs + em->bm->totedge;
}
else {
/* `bm_vertoffs` is calculated from `bm_wireoffs`. (otherwise see T53512) */
bm_wireoffs = bm_solidoffs;
}
/* we draw verts if vert select mode. */
if (ts->selectmode & SCE_SELECT_VERTEX) {