From 6dcf8ba1894af3b24a8b40887867b0ffe6408401 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 16 Nov 2014 14:56:44 +0100 Subject: Knife: fix recent drag option /w loop close It would miss adding an edge when closing the loop. --- source/blender/editors/mesh/editmesh_knife.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c index 6246abda125..b08f7ef9613 100644 --- a/source/blender/editors/mesh/editmesh_knife.c +++ b/source/blender/editors/mesh/editmesh_knife.c @@ -3012,12 +3012,22 @@ static int knifetool_modal(bContext *C, wmOperator *op, const wmEvent *event) } else { kcd->is_drag_hold = false; + + /* needed because the last face 'hit' is ignored when dragging */ + knifetool_update_mval(kcd, kcd->curr.mval); } ED_region_tag_redraw(kcd->ar); break; case KNF_MODAL_ADD_CUT_CLOSED: if (kcd->mode == MODE_DRAGGING) { + + /* shouldn't be possible with default key-layout, just incase... */ + if (kcd->is_drag_hold) { + kcd->is_drag_hold = false; + knifetool_update_mval(kcd, kcd->curr.mval); + } + kcd->prev = kcd->curr; kcd->curr = kcd->init; -- cgit v1.2.3