Knife: fix glitch dragging mouse outside the face

Had a small gap between the last-vertex & new-cut
This commit is contained in:
2015-03-03 09:27:38 +11:00
parent c271a9fa8b
commit e2c24a18e3

View File

@@ -884,16 +884,15 @@ static void knife_add_cut(KnifeTool_OpData *kcd)
KnifeLineHit *lh;
/* was "in face" but now we have a KnifeVert it is snapped to */
lh = &kcd->linehits[kcd->totlinehit - 1];
if (kcd->is_drag_hold) {
linehit_to_knifepos(&kcd->prev, lh);
}
else {
kcd->prev.vert = lh->v;
}
kcd->prev.vert = lh->v;
kcd->prev.bmface = NULL;
}
if (kcd->is_drag_hold) {
lh = &kcd->linehits[kcd->totlinehit - 1];
linehit_to_knifepos(&kcd->prev, lh);
}
BLI_ghash_free(facehits, NULL, NULL);
MEM_freeN(kcd->linehits);
kcd->linehits = NULL;