diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-03-03 01:27:38 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-03-03 01:29:44 +0300 |
commit | e2c24a18e359517c7e5ae83a6540d3d08bbef8d3 (patch) | |
tree | f8a7c84af704ec003657dbcc6fd5966b69b4371a /source | |
parent | c271a9fa8bc41eb6b1380aaa84c27c3da5cfb74e (diff) |
Knife: fix glitch dragging mouse outside the face
Had a small gap between the last-vertex & new-cut
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/mesh/editmesh_knife.c | 13 |
1 files 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; |