Be more diligent in preventing drag line errors

They can happen even when there are no collisions, so we need to reset
the 'ok' flag before using the line again.

Fixes https://gitlab.com/kicad/code/kicad/issues/9555
This commit is contained in:
Seth Hillbrand 2022-01-31 16:08:15 -08:00
parent 73d0d7796c
commit 833ce19221
1 changed files with 3 additions and 0 deletions

View File

@ -573,6 +573,9 @@ bool DRAGGER::dragWalkaround( const VECTOR2I& aP )
ok = true;
}
if( draggedWalk.CLine().PointCount() < 2 )
ok = false;
if( ok )
{
PNS_DBG( Dbg(), AddLine, origLine.CLine(), BLUE, 50000, "drag-orig-line" );