From 6b3410974d7db8c67c7d1cd8ca280c09db372311 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Mon, 30 Apr 2018 17:03:50 +0100 Subject: [PATCH] Fix "same layers" test when duplicating zones. --- pcbnew/tools/pcb_editor_control.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pcbnew/tools/pcb_editor_control.cpp b/pcbnew/tools/pcb_editor_control.cpp index 0c89eff089..d2102cc3d1 100644 --- a/pcbnew/tools/pcb_editor_control.cpp +++ b/pcbnew/tools/pcb_editor_control.cpp @@ -804,7 +804,9 @@ int PCB_EDITOR_CONTROL::ZoneDuplicate( const TOOL_EVENT& aEvent ) // If the new zone is on the same layer(s) as the the initial zone, // offset it a bit so it can more easily be picked. - if( oldZone->GetLayerSet() == zoneSettings.m_Layers ) + if( oldZone->GetIsKeepout() && ( oldZone->GetLayerSet() == zoneSettings.m_Layers ) ) + newZone->Move( wxPoint( IU_PER_MM, IU_PER_MM ) ); + else if( !oldZone->GetIsKeepout() && ( oldZone->GetLayer() == zoneSettings.m_CurrentZone_Layer ) ) newZone->Move( wxPoint( IU_PER_MM, IU_PER_MM ) ); commit.Add( newZone.release() );