Don't try to fetch layer of multi-layer objects.
This commit is contained in:
parent
81bed9ab96
commit
ce0233577b
|
@ -181,8 +181,8 @@ bool BOARD_ITEM::ptr_cmp::operator() ( const BOARD_ITEM* a, const BOARD_ITEM* b
|
|||
if( a->Type() != b->Type() )
|
||||
return a->Type() < b->Type();
|
||||
|
||||
if( a->GetLayer() != b->GetLayer() )
|
||||
return a->GetLayer() < b->GetLayer();
|
||||
if( a->GetLayerSet() != b->GetLayerSet() )
|
||||
return a->GetLayerSet().Seq() < b->GetLayerSet().Seq();
|
||||
|
||||
if( a->m_Uuid != b->m_Uuid ) // UUIDs *should* always be unique (for valid boards anyway)
|
||||
return a->m_Uuid < b->m_Uuid;
|
||||
|
|
|
@ -255,7 +255,7 @@ bool DRC_TEST_PROVIDER_EDGE_CLEARANCE::Run()
|
|||
m_largestClearance );
|
||||
}
|
||||
|
||||
if( testSilk && ( item->GetLayer() == F_SilkS || item->GetLayer() == B_SilkS ) )
|
||||
if( testSilk && ( item->IsOnLayer( F_SilkS ) || item->IsOnLayer( B_SilkS ) ) )
|
||||
{
|
||||
if( edgesTree.QueryColliding( item, UNDEFINED_LAYER, testLayer, nullptr,
|
||||
[&]( BOARD_ITEM* edge ) -> bool
|
||||
|
|
Loading…
Reference in New Issue