diff options
author | Sergej Reich <sergej.reich@googlemail.com> | 2013-11-08 22:01:05 +0400 |
---|---|---|
committer | Sergej Reich <sergej.reich@googlemail.com> | 2013-11-08 22:01:05 +0400 |
commit | b144f155799fc7438d3870fac824f287f80be738 (patch) | |
tree | e72b9c6aab68d796999b714541c2851f6c648dca /source | |
parent | 774987a38150c8e43114b58aad9c619dac5eafd7 (diff) |
knife tool: Clean up line hits when starting a new cut
Fixes intersection points of the previous cut still being drawn when
starting a new cut.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/mesh/editmesh_knife.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c index 32d17f6c599..2e476da2558 100644 --- a/source/blender/editors/mesh/editmesh_knife.c +++ b/source/blender/editors/mesh/editmesh_knife.c @@ -792,9 +792,13 @@ static void knife_add_cut(KnifeTool_OpData *kcd) kcd->totlinehit = 0; } -static void knife_finish_cut(KnifeTool_OpData *UNUSED(kcd)) +static void knife_finish_cut(KnifeTool_OpData *kcd) { - + if (kcd->linehits) { + MEM_freeN(kcd->linehits); + kcd->linehits = NULL; + kcd->totlinehit = 0; + } } static void knifetool_draw_angle_snapping(const KnifeTool_OpData *kcd) |