From 5a51a6b1790df45fcb5e1069d3986ff686069754 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sat, 21 Oct 2023 15:06:50 +0100 Subject: [PATCH] Make offset-zone check multi-layer aware. Fixes https://gitlab.com/kicad/code/kicad/-/issues/15916 (cherry picked from commit b97d8ddef41c3b9e10189883fbfc512f4ec1583e) --- pcbnew/tools/board_editor_control.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pcbnew/tools/board_editor_control.cpp b/pcbnew/tools/board_editor_control.cpp index 8db2259970..340060ede6 100644 --- a/pcbnew/tools/board_editor_control.cpp +++ b/pcbnew/tools/board_editor_control.cpp @@ -1428,9 +1428,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( wxPoint( 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( wxPoint( pcbIUScale.IU_PER_MM, pcbIUScale.IU_PER_MM ) ); commit.Add( newZone.release() );