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 32674ef360)
This commit is contained in:
qu1ck 2020-01-13 17:04:35 -08:00 committed by Ian McInerney
parent ac39e32bc9
commit 798e4c288a
1 changed files with 7 additions and 2 deletions

View File

@ -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 )
{