Careful of calculated fields when comparing board FPs with library.

Fixes https://gitlab.com/kicad/code/kicad/issues/10143
This commit is contained in:
Jeff Young 2022-03-17 12:52:04 +00:00
parent 1a493ed9ed
commit 0f359c8a3b
1 changed files with 6 additions and 2 deletions

View File

@ -199,8 +199,12 @@ bool shapesNeedUpdate( const FP_SHAPE* a, const FP_SHAPE* b )
case SHAPE_T::ARC: case SHAPE_T::ARC:
TEST( a->GetStart0(), b->GetStart0() ); TEST( a->GetStart0(), b->GetStart0() );
TEST( a->GetEnd0(), b->GetEnd0() ); TEST( a->GetEnd0(), b->GetEnd0() );
TEST( a->GetCenter0(), b->GetCenter0() );
TEST_D( a->GetArcAngle().AsDegrees(), b->GetArcAngle().AsDegrees() ); // Arc center is calculated and so may have round-off errors when parents are
// differentially rotated.
if( ( a->GetCenter0() - b->GetCenter0() ).EuclideanNorm() > Millimeter2iu( 0.0001 ) )
return true;
break; break;
case SHAPE_T::BEZIER: case SHAPE_T::BEZIER: