GRID_HELPER: Match layer set when snapping

This allows items to snap to multi-layer target anchors such as vias and
through hole pads.
This commit is contained in:
Seth Hillbrand 2018-10-04 20:41:17 -07:00
parent f8f2af774c
commit f56b5cf7bd
1 changed files with 1 additions and 1 deletions

View File

@ -449,7 +449,7 @@ GRID_HELPER::ANCHOR* GRID_HELPER::nearestAnchor( const VECTOR2I& aPos, int aFlag
for( ANCHOR& a : m_anchors ) for( ANCHOR& a : m_anchors )
{ {
if( !aMatchLayers[a.item->GetLayer()] ) if( ( aMatchLayers & a.item->GetLayerSet() ) == 0 )
continue; continue;
if( ( aFlags & a.flags ) != aFlags ) if( ( aFlags & a.flags ) != aFlags )