From cf47d665ea3854be560403e7e56abfc9a8b48b83 Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Thu, 22 Apr 2021 09:04:31 -0400 Subject: [PATCH] PNS: Dragged line needs to retain width Fixes https://gitlab.com/kicad/code/kicad/-/issues/8246 --- pcbnew/router/pns_line.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pcbnew/router/pns_line.cpp b/pcbnew/router/pns_line.cpp index 97cb189070..ed40e1feab 100644 --- a/pcbnew/router/pns_line.cpp +++ b/pcbnew/router/pns_line.cpp @@ -562,10 +562,12 @@ SHAPE_LINE_CHAIN dragCornerInternal( const SHAPE_LINE_CHAIN& aOrigin, const VECT return DIRECTION_45().BuildInitialTrace( aOrigin.CPoint( 0 ), aP, dir.IsDiagonal() ); } + void LINE::dragCorner45( const VECTOR2I& aP, int aIndex ) { SHAPE_LINE_CHAIN path; + int width = m_line.Width(); VECTOR2I snapped = snapDraggedCorner( m_line, aP, aIndex ); if( aIndex == 0 ) @@ -586,9 +588,11 @@ void LINE::dragCorner45( const VECTOR2I& aP, int aIndex ) } path.Simplify(); + path.SetWidth( width ); m_line = path; } + void LINE::dragCornerFree( const VECTOR2I& aP, int aIndex ) { const std::vector& shapes = m_line.CShapes();