diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-11-16 16:56:44 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-11-16 16:57:28 +0300 |
commit | 6dcf8ba1894af3b24a8b40887867b0ffe6408401 (patch) | |
tree | 08bcb15f08a7e21b654cd020f4f5c359428c8aed | |
parent | 832a97f00270ad6d5740d3b8938d82269760964e (diff) |
Knife: fix recent drag option /w loop close
It would miss adding an edge when closing the loop.
-rw-r--r-- | source/blender/editors/mesh/editmesh_knife.c | 10 |
1 files changed, 10 insertions, 0 deletions
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; |