fix [#36861] In face select masking circle select selects all when out of focus.

This commit is contained in:
Campbell Barton
2013-09-30 07:58:38 +00:00
parent b21b24573d
commit d6a52c67d5
2 changed files with 11 additions and 8 deletions

View File

@@ -266,6 +266,7 @@ bool EDBM_backbuf_border_init(ViewContext *vc, short xmin, short ymin, short xma
int EDBM_backbuf_check(unsigned int index)
{
BLI_assert(selbuf != NULL);
if (selbuf == NULL) return 1;
if (index > 0 && index <= bm_vertoffs)
return selbuf[index];

View File

@@ -2406,12 +2406,12 @@ static void paint_facesel_circle_select(ViewContext *vc, const bool select, cons
{
Object *ob = vc->obact;
Mesh *me = ob ? ob->data : NULL;
/* int bbsel; */ /* UNUSED */
bool bbsel;
if (me) {
bm_vertoffs = me->totpoly + 1; /* max index array */
bm_vertoffs = me->totpoly + 1; /* max index array */
/* bbsel = */ /* UNUSED */ EDBM_backbuf_circle_init(vc, mval[0], mval[1], (short)(rad + 1.0f));
bbsel = EDBM_backbuf_circle_init(vc, mval[0], mval[1], (short)(rad + 1.0f));
if (bbsel) {
edbm_backbuf_check_and_select_tfaces(me, select);
EDBM_backbuf_free();
paintface_flush_flags(ob);
@@ -2431,15 +2431,17 @@ static void paint_vertsel_circle_select(ViewContext *vc, const bool select, cons
const int use_zbuf = (vc->v3d->flag & V3D_ZBUF_SELECT);
Object *ob = vc->obact;
Mesh *me = ob->data;
/* int bbsel; */ /* UNUSED */
bool bbsel;
/* CircleSelectUserData data = {NULL}; */ /* UNUSED */
if (use_zbuf) {
bm_vertoffs = me->totvert + 1; /* max index array */
/* bbsel = */ /* UNUSED */ EDBM_backbuf_circle_init(vc, mval[0], mval[1], (short)(rad + 1.0f));
edbm_backbuf_check_and_select_verts_obmode(me, select);
EDBM_backbuf_free();
bbsel = EDBM_backbuf_circle_init(vc, mval[0], mval[1], (short)(rad + 1.0f));
if (bbsel) {
edbm_backbuf_check_and_select_verts_obmode(me, select);
EDBM_backbuf_free();
}
}
else {
CircleSelectUserData data;