Trim pad layers to current board before comparing.

Fixes https://gitlab.com/kicad/code/kicad/issues/12758
This commit is contained in:
Jeff Young 2022-10-25 23:52:51 +01:00
parent c026c3af7b
commit 9380b9a451
1 changed files with 7 additions and 1 deletions

View File

@ -144,7 +144,13 @@ bool padsNeedUpdate( const PAD* a, const PAD* b )
TEST( a->GetKeepTopBottom(), b->GetKeepTopBottom() ); TEST( a->GetKeepTopBottom(), b->GetKeepTopBottom() );
TEST( a->GetShape(), b->GetShape() ); TEST( a->GetShape(), b->GetShape() );
TEST( a->GetLayerSet(), b->GetLayerSet() );
// Trim layersets to the current board before comparing
LSET enabledLayers = a->GetBoard()->GetEnabledLayers();
LSET aLayers = a->GetLayerSet() & enabledLayers;
LSET bLayers = b->GetLayerSet() & enabledLayers;
TEST( aLayers, bLayers );
TEST( a->GetAttribute(), b->GetAttribute() ); TEST( a->GetAttribute(), b->GetAttribute() );
TEST( a->GetProperty(), b->GetProperty() ); TEST( a->GetProperty(), b->GetProperty() );