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.
This commit is contained in:
qu1ck 2020-01-13 17:04:35 -08:00 committed by Seth Hillbrand
parent 8ac0d84f45
commit 32674ef360
1 changed files with 7 additions and 2 deletions

View File

@ -95,8 +95,13 @@ double DRAWSEGMENT::GetLength() 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 )
{