Make sure pad primitives get normalized before diff'ing.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15208
This commit is contained in:
parent
297bbca0ea
commit
a9b7b73f10
|
@ -135,8 +135,20 @@ bool primitiveNeedsUpdate( const std::shared_ptr<PCB_SHAPE>& a,
|
|||
|
||||
switch( a->GetShape() )
|
||||
{
|
||||
case SHAPE_T::SEGMENT:
|
||||
case SHAPE_T::RECTANGLE:
|
||||
{
|
||||
BOX2I aRect( a->GetStart(), a->GetEnd() - a->GetStart() );
|
||||
BOX2I bRect( b->GetStart(), b->GetEnd() - b->GetStart() );
|
||||
|
||||
aRect.Normalize();
|
||||
bRect.Normalize();
|
||||
|
||||
TEST( aRect.GetOrigin(), bRect.GetOrigin(), "" );
|
||||
TEST( aRect.GetEnd(), bRect.GetEnd(), "" );
|
||||
break;
|
||||
}
|
||||
|
||||
case SHAPE_T::SEGMENT:
|
||||
case SHAPE_T::CIRCLE:
|
||||
TEST( a->GetStart(), b->GetStart(), "" );
|
||||
TEST( a->GetEnd(), b->GetEnd(), "" );
|
||||
|
|
Loading…
Reference in New Issue