From e2c24a18e359517c7e5ae83a6540d3d08bbef8d3 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 3 Mar 2015 09:27:38 +1100 Subject: [PATCH] Knife: fix glitch dragging mouse outside the face Had a small gap between the last-vertex & new-cut --- source/blender/editors/mesh/editmesh_knife.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c index 5b2dd560988..f3745ed72fb 100644 --- a/source/blender/editors/mesh/editmesh_knife.c +++ b/source/blender/editors/mesh/editmesh_knife.c @@ -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;