Fix T38834: Knife constraint is offset after moving the view

This commit is contained in:
Campbell Barton 2014-02-27 13:28:25 +11:00
parent b5d6f14290
commit a815e04f72
Notes: blender-bot 2023-02-14 11:07:23 +01:00
Referenced by issue #38834, Knife tool "angle constrain" doesn't work properly after panning 3D view
1 changed files with 4 additions and 0 deletions

View File

@ -1797,6 +1797,10 @@ static int knife_update_active(KnifeTool_OpData *kcd)
{
knife_pos_data_clear(&kcd->curr);
copy_v2_v2(kcd->curr.mval, kcd->mval);
/* view matrix may have changed, reproject */
knife_project_v2(kcd, kcd->prev.co, kcd->prev.mval);
if (kcd->angle_snapping != ANGLE_FREE && kcd->mode == MODE_DRAGGING)
knife_snap_angle(kcd);