From 9380b9a451ad3a98fd99f4ebd7514a2691ba4385 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Tue, 25 Oct 2022 23:52:51 +0100 Subject: [PATCH] Trim pad layers to current board before comparing. Fixes https://gitlab.com/kicad/code/kicad/issues/12758 --- pcbnew/drc/drc_test_provider_library_parity.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pcbnew/drc/drc_test_provider_library_parity.cpp b/pcbnew/drc/drc_test_provider_library_parity.cpp index d86d3d86f6..7e5e7777d0 100644 --- a/pcbnew/drc/drc_test_provider_library_parity.cpp +++ b/pcbnew/drc/drc_test_provider_library_parity.cpp @@ -144,7 +144,13 @@ bool padsNeedUpdate( const PAD* a, const PAD* b ) TEST( a->GetKeepTopBottom(), b->GetKeepTopBottom() ); 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->GetProperty(), b->GetProperty() );