7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-21 14:41:42 +00:00

Pcbnew: line polar edit: correct endpoint calculation

The translation vector went missing so it was wrong for lines
not starting at (0, 0).

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/19220
This commit is contained in:
John Beard 2024-11-29 19:03:33 +08:00
parent 7e75fe19de
commit c9164272ab

View File

@ -355,10 +355,10 @@ public:
const int length = GetIntValue( LENGTH );
const EDA_ANGLE angle = GetAngleValue( ANGLE );
VECTOR2I polar = GetRotated( VECTOR2I{ length, 0 }, angle );
const VECTOR2I polar = GetRotated( VECTOR2I{ length, 0 }, angle );
GetShape().SetStart( p0 );
GetShape().SetEnd( polar );
GetShape().SetEnd( p0 + polar );
updateEnds();
updateStartMidpoint();