Make offset-zone check multi-layer aware.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15916
This commit is contained in:
Jeff Young 2023-10-21 15:06:50 +01:00
parent 68e46ecad5
commit b97d8ddef4
1 changed files with 1 additions and 3 deletions

View File

@ -1440,9 +1440,7 @@ int BOARD_EDITOR_CONTROL::ZoneDuplicate( const TOOL_EVENT& aEvent )
// If the new zone is on the same layer(s) as the initial zone,
// offset it a bit so it can more easily be picked.
if( oldZone->GetIsRuleArea() && ( oldZone->GetLayerSet() == zoneSettings.m_Layers ) )
newZone->Move( VECTOR2I( pcbIUScale.IU_PER_MM, pcbIUScale.IU_PER_MM ) );
else if( !oldZone->GetIsRuleArea() && zoneSettings.m_Layers.test( oldZone->GetLayer() ) )
if( oldZone->GetLayerSet() == zoneSettings.m_Layers )
newZone->Move( VECTOR2I( pcbIUScale.IU_PER_MM, pcbIUScale.IU_PER_MM ) );
commit.Add( newZone.release() );