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:
parent
f8f2af774c
commit
f56b5cf7bd
|
@ -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 )
|
||||||
|
|
Loading…
Reference in New Issue