pcbnew: multiple keepout zone bug fixes
- Fixes segfault in ZONE_CONTAINER::SetLayerSet - Copies layerset when using assignment and new()
This commit is contained in:
parent
d00fc993f3
commit
6573a43f3a
|
@ -105,6 +105,7 @@ ZONE_CONTAINER::ZONE_CONTAINER( const ZONE_CONTAINER& aZone ) :
|
|||
m_hatchPitch = aZone.m_hatchPitch;
|
||||
m_HatchLines = aZone.m_HatchLines;
|
||||
|
||||
SetLayerSet( aZone.GetLayerSet() );
|
||||
SetLocalFlags( aZone.GetLocalFlags() );
|
||||
}
|
||||
|
||||
|
@ -133,6 +134,8 @@ ZONE_CONTAINER& ZONE_CONTAINER::operator=( const ZONE_CONTAINER& aOther )
|
|||
m_FillSegmList.clear();
|
||||
m_FillSegmList = aOther.m_FillSegmList;
|
||||
|
||||
SetLayerSet( aOther.GetLayerSet() );
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
@ -213,17 +216,17 @@ void ZONE_CONTAINER::SetLayer( PCB_LAYER_ID aLayer )
|
|||
|
||||
void ZONE_CONTAINER::SetLayerSet( LSET aLayerSet )
|
||||
{
|
||||
if( aLayerSet.count() == 0 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if( GetIsKeepout() )
|
||||
{
|
||||
// Keepouts can only exist on copper layers
|
||||
aLayerSet &= LSET::AllCuMask();
|
||||
}
|
||||
|
||||
if( aLayerSet.count() == 0 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
m_layerSet = aLayerSet;
|
||||
|
||||
// Set the single layer to the first selected layer
|
||||
|
|
Loading…
Reference in New Issue