Don't ask for layer of multi-layer objects.
This commit is contained in:
parent
89907a18ce
commit
1ee3ce45e8
|
@ -158,7 +158,7 @@ void DRC_TEST_PROVIDER_MISC::testDisabledLayers()
|
|||
if( pad->GetAttribute() == PAD_ATTRIB::SMD
|
||||
|| pad->GetAttribute() == PAD_ATTRIB::CONN )
|
||||
{
|
||||
if( disabledLayers.test( item->GetLayer() ) )
|
||||
if( disabledLayers.test( pad->GetPrincipalLayer() ) )
|
||||
badLayer = item->GetLayer();
|
||||
}
|
||||
else
|
||||
|
|
|
@ -208,6 +208,16 @@ PCB_LAYER_ID PAD::GetLayer() const
|
|||
}
|
||||
|
||||
|
||||
PCB_LAYER_ID PAD::GetPrincipalLayer() const
|
||||
{
|
||||
if( m_attribute == PAD_ATTRIB::SMD || m_attribute == PAD_ATTRIB::CONN )
|
||||
return m_layer;
|
||||
|
||||
wxFAIL_MSG( wxT( "Non-SMD/CONN pads have no principal layer." ) );
|
||||
return m_layer;
|
||||
}
|
||||
|
||||
|
||||
bool PAD::FlashLayer( LSET aLayers ) const
|
||||
{
|
||||
for( auto layer : aLayers.Seq() )
|
||||
|
|
|
@ -587,6 +587,11 @@ public:
|
|||
|
||||
PCB_LAYER_ID GetLayer() const override;
|
||||
|
||||
/**
|
||||
* @return the principal copper layer for SMD and CONN pads.
|
||||
*/
|
||||
PCB_LAYER_ID GetPrincipalLayer() const;
|
||||
|
||||
/**
|
||||
* Check to see if the pad should be flashed to any of the layers in the set.
|
||||
*
|
||||
|
|
|
@ -5735,6 +5735,7 @@ ZONE* PCB_PARSER::parseZONE( BOARD_ITEM_CONTAINER* aParent )
|
|||
}
|
||||
else
|
||||
{
|
||||
// for legacy, single-layer zones
|
||||
filledLayer = zone->GetFirstLayer();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue