PNS: Dragged line needs to retain width

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8246
This commit is contained in:
Jon Evans 2021-04-22 09:04:31 -04:00
parent ecb2e0e031
commit cf47d665ea
1 changed files with 4 additions and 0 deletions

View File

@ -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<ssize_t>& shapes = m_line.CShapes();