From 798e4c288a4c0c86046ee3a0b1641fe768702865 Mon Sep 17 00:00:00 2001 From: qu1ck Date: Mon, 13 Jan 2020 17:04:35 -0800 Subject: [PATCH] Fix polygon shape move Move vector should not affect start/end points as they are assumed to always be 0,0. Polygon is defined by outline only. (cherry-picked from 32674ef3606e2050b7257830067303a929efc9f4) --- pcbnew/class_drawsegment.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pcbnew/class_drawsegment.cpp b/pcbnew/class_drawsegment.cpp index ba8a23f968..d16a82f5e2 100644 --- a/pcbnew/class_drawsegment.cpp +++ b/pcbnew/class_drawsegment.cpp @@ -79,8 +79,13 @@ const wxPoint DRAWSEGMENT::GetPosition() const void DRAWSEGMENT::Move( const wxPoint& aMoveVector ) { - m_Start += aMoveVector; - m_End += aMoveVector; + // Move vector should not affect start/end for polygon since it will + // be applied directly to polygon outline. + if( m_Shape != S_POLYGON ) + { + m_Start += aMoveVector; + m_End += aMoveVector; + } switch ( m_Shape ) {