Fix some layer handling issues.

This commit is contained in:
Jeff Young 2022-04-23 21:29:46 +01:00
parent dd561f1e4d
commit f0dab2e07b
4 changed files with 6 additions and 6 deletions

View File

@ -163,7 +163,7 @@ void DRC_TEST_PROVIDER_MISC::testDisabledLayers()
}
else
{
// Through hole pad is on whatever layers there are.
// Through hole pad pierces all physical layers.
}
}
else if( item->Type() == PCB_VIA_T )

View File

@ -113,7 +113,7 @@ void PCB_EDIT_FRAME::Edit_Zone_Params( ZONE* aZone )
bool BOARD::TestZoneIntersection( ZONE* aZone1, ZONE* aZone2 )
{
// see if areas are on same layer
if( aZone1->GetLayer() != aZone2->GetLayer() )
if( !( aZone1->GetLayerSet() & aZone2->GetLayerSet() ).any() )
return false;
SHAPE_POLY_SET* poly1 = aZone1->Outline();

View File

@ -196,6 +196,7 @@ bool PAD::IsFlipped() const
{
if( GetParent() && GetParent()->GetLayer() == B_Cu )
return true;
return false;
}
@ -210,9 +211,8 @@ 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;
else
return GetLayerSet().Seq().front();
}

View File

@ -1459,7 +1459,7 @@ int BOARD_EDITOR_CONTROL::ZoneMerge( const TOOL_EVENT& aEvent )
continue;
}
if( curr_area->GetLayer() != firstZone->GetLayer() )
if( curr_area->GetLayerSet() != firstZone->GetLayerSet() )
{
wxLogMessage( _( "Some zone layer sets did not match and were not merged." ) );
continue;