Wybren report #1709:

Deleting only-faces from fgon still draws wires hidden in editmode.

Added extra: when mesh has no faces, it draws wire in solid view, also
doesn't draw the 'fat' outline for selection.
This commit is contained in:
Ton Roosendaal 2004-10-30 13:42:49 +00:00
parent 02b2fc5ec8
commit d149a79ad1
2 changed files with 21 additions and 12 deletions

@ -3861,19 +3861,22 @@ static void drawSolidSelect(Object *ob, ListBase *lb)
if(ob->type==OB_MESH) {
/* optimal draw gives ugly outline, so we temporally disable it */
Mesh *me= ob->data;
DispList *dl= me->disp.first;
DispListMesh *dlm=NULL;
short flag= 0;
if(dl && dl->mesh) {
dlm= dl->mesh;
flag= dlm->flag & ME_OPT_EDGES;
dlm->flag &= ~ME_OPT_EDGES;
}
drawmeshwire(ob);
if(me->totface) {
DispList *dl= me->disp.first;
DispListMesh *dlm=NULL;
short flag= 0;
if(dl && dl->mesh) {
dlm= dl->mesh;
flag= dlm->flag & ME_OPT_EDGES;
dlm->flag &= ~ME_OPT_EDGES;
}
drawmeshwire(ob);
if(dlm && flag) dlm->flag |= flag;
if(dlm && flag) dlm->flag |= flag;
}
}
else drawDispListwire(lb);
@ -4197,7 +4200,7 @@ void draw_object(Base *base)
if(ob_from_decimator(ob)) drawDispListwire(&ob->disp);
else if(dt==OB_BOUNDBOX) draw_bounding_volume(ob);
else if(dt==OB_WIRE) drawmeshwire(ob);
else if(dt==OB_WIRE || me->totface==0) drawmeshwire(ob);
else if(ma && (ma->mode & MA_HALO)) drawmeshwire(ob);
else if(me->tface) {
if(G.f & G_FACESELECT || G.vd->drawtype==OB_TEXTURE) {

@ -1594,6 +1594,12 @@ void EM_fgon_flags(void)
BLI_addtail(&em->faces, efa);
efa= efan;
}
// remove fgon flags when edge not in fgon (anymore)
for(eed= em->edges.first; eed; eed= eed->next) {
if(eed->fgoni==0) eed->h &= ~EM_FGON;
}
}