From f56b5cf7bd0c6204ec2c95a76ed001ed8a1297a6 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Thu, 4 Oct 2018 20:41:17 -0700 Subject: [PATCH] GRID_HELPER: Match layer set when snapping This allows items to snap to multi-layer target anchors such as vias and through hole pads. --- pcbnew/tools/grid_helper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcbnew/tools/grid_helper.cpp b/pcbnew/tools/grid_helper.cpp index a20d71b2c4..a24bd96947 100644 --- a/pcbnew/tools/grid_helper.cpp +++ b/pcbnew/tools/grid_helper.cpp @@ -449,7 +449,7 @@ GRID_HELPER::ANCHOR* GRID_HELPER::nearestAnchor( const VECTOR2I& aPos, int aFlag for( ANCHOR& a : m_anchors ) { - if( !aMatchLayers[a.item->GetLayer()] ) + if( ( aMatchLayers & a.item->GetLayerSet() ) == 0 ) continue; if( ( aFlags & a.flags ) != aFlags )